Spring Boot
Almost 5 years ago (time flies!) Phil Webb and Dave Syer wrote a blog and twitter entry that boiled down to this: @Controller class ThisWillActuallyRun […]
Continue reading »Golden nuggets where no entry is longer than my expected attention span
Almost 5 years ago (time flies!) Phil Webb and Dave Syer wrote a blog and twitter entry that boiled down to this: @Controller class ThisWillActuallyRun […]
Continue reading »
Phil Nash wrote a great article about common Rails errors and how to deal with them. The common errors are: 1. ActionController::RoutingError 2. NoMethodError: undefined […]
Continue reading »
Apache Apache is a great piece of website software. What I like the best, is that it is mature and reliable. It is also easy […]
Continue reading »
Divi (https://www.elegantthemes.com) $89/år eller $249 lifetime fee OceanWP Enfold $59 (https://themeforest.net/item/enfold-responsive-multipurpose-theme/4519990)
Continue reading »Note: All commands must be prefixed with “sudo” in case your user account doesn’t have enough privileges. System $ uname -a Displays Linux system information […]
Continue reading »
In accordance with the new policy of releasing a new Java version every 6 months, we now have a fresh installation of Java 11 to […]
Continue reading »
Nowadays, it’s easier than ever to create your own computer language. Whether it’s a simple rule-system, or a full-blown language, you can create the tokenizer […]
Continue reading »
Microservices, when supported by a robust framework, is a incredibly productive way of building large-scale services. You get a lot of support from the framework, […]
Continue reading »For macOS/OSX all you need to do is download and run the DMG from http://www.oracle.com/technetwork/java/javase/downloads/jdk9-downloads-3848520.html
Continue reading »Saving your git password lets you skip giving username/password at every checkin Normally you use git config –global credential.helper store but this is not very […]
Continue reading »MySQL/MariaDB Remember to change bind-address to 0.0.0.0. By default it is set to 127.0.0.1 and then you can’t connect remotely! Exactly which config file it […]
Continue reading »http://www.linuxproblem.org/art_9.html Basically you add the content of your own ~/.ssh/id_rsa.pub to the targets ~/.ssh/authorized_keys file. (Replace ‘a’ with your username, A with your hostname or […]
Continue reading »Since Oracles own instructions (https://docs.oracle.com/javase/9/install/installation-jdk-and-jre-linux-platforms.htm) sucks big time, I can recommend this one instead: https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-get-on-ubuntu-16-04 Simple and easy to follow. And it WORKS!
Continue reading »Some alternatives to Angular 1.x (deprecated), Angular 2 (Typescript) and Angular v4 https://www.slant.co/topics/4306/~angular-js-alternatives vue.js riot react (not a framework, per se. It’s a view rendering […]
Continue reading »General structure BEGIN { print “BEGIN” } /filter1/ { print $0 } /$6 == “Nov”/ { print $1, $2 } […]
Continue reading »
The single reason why I started dating Ruby class VCR def initialize @messages = [] end def method_missing(method, *args, &block) @messages << [method, args, block] […]
Continue reading »You can find a lot of business terms here https://en.wikipedia.org/wiki/List_of_business_terms https://en.wikipedia.org/wiki/List_of_buzzwords Churn Rate Churn rate, when applied to a customer base, refers to the proportion […]
Continue reading »problem You know when you want to select records depending on the values of related records (like belongs_to fields) ? scenario class TradingSignal < ActiveRecord::Base […]
Continue reading »Nested forms with HABTM and HasManyThrough Start with the models has_many :events # creates …… accepts_nested_attributes_for :events, :allow_destroy => true # creates…. attr_accessible :events_attributes # […]
Continue reading »You know how it is, you need to download a 3GB install kit, but don’t want to disturb the missuz by clogging all the bandwidth. […]
Continue reading »Exempel 1 : Hitta den exponentialfunktion som går genom punkterna (1, 2) och (3, 5) Hitta basen a som kvoten mellan y2 och y1 a […]
Continue reading »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 »