Skip to content

Instantly share code, notes, and snippets.

Never asked for this.

Paweł Gościcki pjg

Never asked for this.
View GitHub Profile

Things I believe

This is a collection of the things I believe about software development. I have worked for years building backend and data processing systems, so read the below within that context.

Agree? Disagree? Feel free to let me know at @JanStette. See also my blog at


Keep it simple, stupid. You ain't gonna need it.

maxim /
Last active Jul 7, 2021
How to use rails load paths, app, and lib directories.

In Rails 3

NOTE: This post now lives (and kept up to date) on my blog:

If you add a dir directly under app/

Do nothing. All files in this dir are eager loaded in production and lazy loaded in development by default.

If you add a dir under app/something/

henrik / big_decimal_inspect.rb
Created Aug 20, 2013
Better BigDecimal#inspect. Great with tests. By @aalin.
View big_decimal_inspect.rb
class BigDecimal
def inspect
format("#<BigDecimal:%x %s>", object_id, to_s('F'))
jsteiner / projections.json
Last active Nov 17, 2017
Example Rails.vim projections for an Ember.js project.
View projections.json
"app/assets/javascripts/models/*.coffee": {
"command": "jmodel",
"alternate": "spec/javascripts/models/",
"template": "App.%S = DS.Model.extend"
"app/assets/javascripts/controllers/*": {
"command": "jcontroller",
"alternate": "spec/javascripts/controllers/",
funny-falcon /
Last active May 27, 2021
Performace patch for ruby-1.9.3-p327


  • this version includes backport of Greg Price's patch for speedup startup .

    ruby-core prefers his way to do thing, so that I abandon cached-lp and sorted-lf patches of mine.

  • this version integrates 'array as queue' patch, which improves performance when push/shift pattern is heavily used on Array.

    This patch is accepted into trunk for Ruby 2.0 and last possible bug is found by Yui Naruse. It is used in production* for a couple of months without issues even with this bug.

tomdale / gist:3981133
Last active Nov 26, 2019
Ember.js Router API v2
View gist:3981133


This gist is outdated! For the most up-to-date information, please see!

It All Starts With Templates

An Ember application starts with its main template. Put your header, footer, and any other decorative content in application.handlebars.

judofyr / fizzbuzz.rb
Created Aug 1, 2012 — forked from JEG2/fizzbuzz.rb
Writing FizzBuzz with flip-flops
View fizzbuzz.rb
a=b=c=(1..100).each do |num|
print num, ?\r,
("Fizz" unless (a = !a) .. (a = !a)),
("Buzz" unless (b = !b) ... !((c = !c) .. (c = !c))),
unak / history.txt
Last active Sep 25, 2019
The History of Ruby
View history.txt
* Only the releases of the stable versions are listed in principle. The releases of the unstable versions especially considered to be important are indicated as "not stable."
* The branches used as the source of each releases are specified, and the branching timing of them are also shown. BTW, before subversionizing of the repository, the term called "trunk" was not used, but this list uses it in order to avoid confusion.
* In order to show a historical backdrop, big conferences (RubyKaigi, RubyConf and Euruko) are also listed. About the venues of such conferences, general English notations are adopted, in my hope.
* ruby_1_8_7 branch was recut from v1_8_7 tag after the 1.8.7 release because of an accident.
* 1.2.1 release was canceled once, and the 2nd release called "repack" was performed. Although there were other examples similar to this, since the re-releases were performed during the same day, it does not write clearly in particular.
* Since 1.0 was released with the date in large quantities, the mi

Recently, we've been working on extracting Ember conventions from applications we're working on into the framework. Our goal is to make it clearer how the parts of an Ember application work together, and how to organize and bootstrap your objects.


Routing is an important part of web applications. It allows your users to share the URL they see in their browser, and have the same things appear when their friends click on the link.

The Ember.js ecosystem has several great solutions for routing. But, since it is such an important part of most web applications, we've decided to build it right into the framework.

If you have already modeled your application state using Ember.StateManager, there are a few changes you'll need to make to enable routing. Once you've made those changes, you'll notice the browser's address bar spring to life as you start using your app—just by moving between states, Ember.js will update the URL automatically.


Routing in Ember

In Ember, the application's state manager handles routing. Let's take a look at a simple example:

App.stateManager = Ember.StateManager.create({
  start: Ember.State.extend({
    index: Ember.State.extend({
      route: "/",