Why Ruby is Great!
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 »Golden nuggets where no entry is longer than my expected attention span
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 »I keep this blog item handy: Docker – Clean Up After Yourself! It talks about how to maintain and clean up the “leftovers” from running […]
Continue reading »This article assumes that you have docker, docker-compose and docker-machine installed. For OSX use Docker Toolbox at docker.com/toolbox. For Linux install docker and docker-compose using […]
Continue reading »Huvudsakligen från https://sulo.se/2011/02/24/svenska-vps-leverantorer-en-prisjamforelse/ https://www.fsdata.se/server/vps http://www.glesys.se/vps.php https://www.oderland.se/tjanster/cloudvps/ http://www.patrikweb.net/content/section/24/51/ http://www.ipeer.se/linux-vps.php https://www.crystone.se/vps http://www.surftown.se/vps/priser http://www.space2u.com/vps.php http://www.itstaden.se/Serverdrift/Virtuell+Server.html Virtuell Privat Server http://www.internetverket.se/premium-vps Molntjänster http://www.adminor.net/vps http://www.securehosting.se/index.php/virtual-servers http://foretag.netit.se/?page_id=564 http://acon.se/tjanster/virtuell-server/ https://www.dalnix.se/tjanster/
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 »Gems you NEED 12 gems every rails developer should know 2016 7 must have gems to install on any project 8 useful ruby on rails […]
Continue reading »You know how it is, you develop using Rails and it is going great! Tailwind and downhill, you develop with an amazing speed. Then when […]
Continue reading »This is essentially a no-nonsense step-by-step description of the most common case from: https://github.com/plataformatec/devise/wiki/How-To:-Allow-users-to-sign-in-using-their-username-or-email-address 1) add a field to the User table rails generate migration […]
Continue reading »The JS environment is, as we know, “complicated”. Every browser uses a different JavaScript engine: Chrome runs V8, Firefox runs SpiderMonkey, and Internet Explorer uses […]
Continue reading »Has this happened to you? You run for a while on the default installation of MySQL. The data increases and suddenly you realize that the […]
Continue reading »http://www.simonthepiman.com/how_to_setup_windows_file_server.php
Continue reading »How to deploy a Rails 4 app with Git and Capistrano
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 »I had to transfer lots (LOTS) of video files from my IMAC where I had catptured a bunch of older DV tapes. Since space ran […]
Continue reading »I have lots and lots of home made movies, mostly in the form of DV-tapes and SD-cards. (This workflow also works for photos and other […]
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 »I have started a new project. Since I do a fair share of investing, both in futures and stocks, I have tried several different ways […]
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 »