Skip to content

Instantly share code, notes, and snippets.

View darthdeus's full-sized avatar

Jakub Arnold darthdeus

View GitHub Profile
@NV
NV / README.md
Created March 24, 2010 19:31
XRefresh for Chrome

XRefresh for Chrome

Deprecated! Use LiveReload instead.

via xrefresh#17

How to use

  • ruby ws_dir_watcher.rb ~/my_site
  • Open chrome://extensions/
  • "Developer mode", then press "Load unpacked extension" button
@ryanb
ryanb / rails_3_1_rc4_changes.md
Created May 6, 2011 01:10
The Changelogs for Rails 3.1 Beta 1

Railties 3.1 RC4

  • The new rake task assets:clean removes precompiled assets. [fxn]

  • Application and plugin generation run bundle install unless --skip-gemfile or --skip-bundle. [fxn]

  • Fixed database tasks for jdbc* adapters #jruby [Rashmi Yadav]

  • Template generation for jdbcpostgresql #jruby [Vishnu Atrai]

@adam-e-trepanier
adam-e-trepanier / spec_helper.rb
Created July 14, 2011 19:00
Spork reload factories
Spork.each_run do
# This code will be run each time you run your specs.
AppName::Application.reload_routes!
Factory.factories.clear
Dir.glob("#{::Rails.root}/spec/factories/*.rb").each { |file| load "#{file}" }
end
@geemus
geemus / addendum.markdown
Created September 1, 2011 20:26
API - Assumptions Probably Incorrect
@defunkt
defunkt / gitio
Created September 11, 2011 08:11
Turn a github.com URL into a git.io URL.
#!/usr/bin/env ruby
# Usage: gitio URL [CODE]
#
# Turns a github.com URL
# into a git.io URL
#
# Copies the git.io URL to your clipboard.
url = ARGV[0]
code = ARGV[1]
@joewest
joewest / didRequestRange.js
Created January 13, 2012 20:14
Ember.PaginationSupport
App.collectionController = Em.ArrayProxy.create(Ember.PaginationSupport, {
content: [],
fullContent: App.store.findAll(App.Job),
totalBinding: 'fullContent.length',
didRequestRange: function(rangeStart, rangeStop) {
var content = this.get('fullContent').slice(rangeStart, rangeStop);
this.replace(0, this.get('length'), content);
}
});
@paulmillr
paulmillr / active.md
Last active March 2, 2025 12:41
Most active GitHub users (by contributions). https://paulmillr.com

Most active GitHub users (git.io/top)

The list would not be updated for now. Don't write comments.

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Because of GitHub search limitations, only 1000 first users according to amount of followers are included. If you are not in the list you don't have enough followers. See raw data and source code. Algorithm in pseudocode:

githubUsers
@mildmojo
mildmojo / left_join_arel_example.rb
Last active April 5, 2024 16:00
LEFT JOIN in ARel for ActiveRecord in Ruby on Rails
# Here's a contrived example of a LEFT JOIN using ARel. This is an example of
# the mechanics, not a real-world use case.
# NOTE: In the gist comments, @ozydingo linked their general-purpose ActiveRecord
# extension that works for any named association. That's what I really wanted!
# Go use that! Go: https://gist.github.com/ozydingo/70de96ad57ab69003446
# == DEFINITIONS
# - A Taxi is a car for hire. A taxi has_many :passengers.
# - A Passenger records one person riding in one taxi one time. It belongs_to :taxi.
@domenic
domenic / promises.md
Last active February 6, 2025 16:34
You're Missing the Point of Promises

This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
 // the rest of your code goes here.
@ion1
ion1 / .ghci
Last active October 11, 2015 19:38
.ghci
:set -Wall -fno-warn-type-defaults
:set -fdefer-type-errors
-- :set prompt "λ> "
:set prompt "H̢̞̘̻̲̩̑̊ͣ̏ͪ̋ͨͮ͋̆͐ͣ̈̒͛̚͡A̴̡̬̼̳͈̮̞̬̞̯͓̤͎̳̫̘̥͈͕̓̍͂͌̓̄͒̿͌̚͟͠S͊̾̃̎͏̷̧̠̤͎̱̱͖͍̖̯̘͘K̶̸̲̳̗̭̹͔͖͇̩̳̦̫̲̩̫̪̠̜̅̌̈́̃̊̚͢ͅE̡̩͕̣̳͓͈͙̪̰ͤ̊͂ͩL̬̙͖̣̱͎͓̘͉̖̭͇͚̲͖̩̞͖̂͛̉ͬ̓͐ͯ͌͘͠͠L̢̧̤̺̩͚͚̩̬̳͉͍̩̆̍ͮ̐̽̌̌ͪ̓ͥͫ̓͑̃ͥ͊͟͢͡ ̩̯̺̖̳̟͖͓͇̗͇̘̬͕̑ͩ̄ͧͧ̀́͆͊̈́̋ͫͥ̓͒̂̓́Ḥ̵̫̮̟̠͖̝̜̬͔̻͓͋͊́ͫ̓̍̆̇͐ͥ̓͆́̚Ȩ̸̨̢͕͚̻͍̯̪̩̯̲͛̓ͥ̄͊̀̽ͯ͊̄̔̈ ̱͖̫̱̺̲̥̦̯̞̘͖̳̝̰͉̮̖ͧ̋͊̓ͪ́̏͑ͬ̈́ͣ̍͑̐͂̄ͦ̃̀͢͡ͅC̷̙̟̫̘̞̦̅̄̂͒̉̈́͌̂ͫ́̐̃̎̎ͬͯ͞O̢͛̂͒ͪ͐̓̎̊͊̋̚͏̢̤̺̱̯͇͓̤͍̼̪́M̨̠̝̻͇̘̣̫͕̗̎̾̄̽͊ͣ́͋̎̆ͧ̅͗̚Ẽ̜̠̦̺͇̠̭̣͓͎́̈̉̕͞S̛̩͔̥̼̰̯͖͉̭̺̦͔̞̹̼̻̻̈́͋͋ͬͤ̿͒͘͘͘>̨̧͖͖̱̟̩͕͇͇ͨ͛̔̉́ͤ́͗͗̂͜͞ "
:set -XBangPatterns
:set -XDataKinds
:set -XDeriveDataTypeable
:set -XDeriveFoldable