Heroku
Heroku Rails Receipes Running a migration heroku run rake db:migrate Clearing a PG database on heroku heroku pg:reset DATABASE WARNING: Destructive action postgresql-flexible-10203 will lose […]
Continue reading »Golden nuggets where no entry is longer than my expected attention span
Heroku Rails Receipes Running a migration heroku run rake db:migrate Clearing a PG database on heroku heroku pg:reset DATABASE WARNING: Destructive action postgresql-flexible-10203 will lose […]
Continue reading »A good article about organising CSS/SASS in Rails http://www.mattboldt.com/organizing-css-and-sass-rails/ Basically you have this in yourapp/assets/stylesheets/application.css /* NOTE: Not Application.scss */ /* *= require_self *= require […]
Continue reading »Harnessing ActiveRecord Outside Rails ActiveRecord, the model component of Rails, is well-known for its versatility. It can be used within Rails, of course, but did […]
Continue reading »To center an image, use margin: auto; and make it into a block element: img { display: block; margin: auto; width: 40%; } Highlight alla länkar som inte länkar nånstans! a[href=”#”], a[href=””], a:not([href]) […]
Continue reading »Just use them! Save a bunch of time when startiung a new project. Here’s my latest fav: Rails 5.1 with Bootstrap, Font Awesome and Devise. […]
Continue reading »Period and Duration are not just alternatives, they work very different. Duration is designed to work in exact measurements in seconds and nanoseconds. However, Period […]
Continue reading »Sometimes you want to test queries etc from the Rails Console that requiers you to be logged in (for example via Devise). This is how […]
Continue reading »Historical Volatility shows how volatile an asset has been. There are numerous ways of calculating it, and I will show the most simple one here. […]
Continue reading »Reasoning I won’t even go into why you should learn patterns. Patterns are canned knowledge! A problem the Builder Pattern solve It helps you avoid […]
Continue reading »If you need to process payments, for example charging the user for using your great new website, Stripe is a great contender. An alternative is […]
Continue reading »Seting up a one Devise user (version 3.5.1 and later) is simple in file <app>/test/fixtures/users.yml: tom: id: 11 name: TestUser email: test@example.org encrypted_password: <%= Devise::Encryptor.digest(User, ‘password’) […]
Continue reading »Great example on how you create a “Netflix-lookalike” app with scrolling in bort vertical and horizontal direction. https://github.com/ThornTechPublic/HorizontalScrollingCollectionView
Continue reading »So….. I wanted to use something as neat and powerful as Rails’ ActiveRecord. I had used hibernate a bit a long time ago, and frankly […]
Continue reading »Setup Create a standard ViewController (NOT a TableViewController!) Drag a Table onto the ViewController. Snap to edges, Reset to “Suggested Constraints”. Option Cmd Shift = […]
Continue reading »Om ‘use strict’: http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/ Modular Javascript/CommonJS: https://addyosmani.com/writing-modular-js/ Babel: Code for ES6 and still be backwards compatible with older browsers: https://babeljs.io JSX In depth: http://facebook.github.io/react/docs/jsx-in-depth.html
Continue reading »Det finns flera ramverk som ger möjlighet att skriva appar i Javascript, och sedan kompilera dem för den målmiljö man är intresserad av (oftast iOS […]
Continue reading »