Skip to content

Instantly share code, notes, and snippets.

{
"payload": {
"id": 1,
"number": 1,
"status": null,
"started_at": null,
"finished_at": null,
"status_message": "Passed",
"commit": "62aae5f70ceee39123ef",
"branch": "master",
@drogus
drogus / Rakefile.rb
Created July 26, 2013 10:49
This is the example contents of the Rakefile, which you would use to run active record tasks without using Rails. It assumes using the same directories as rails uses: `db/migrate`, `config/database.yml`.
require 'bundler/setup'
require 'active_record'
include ActiveRecord::Tasks
db_dir = File.expand_path('../db', __FILE__)
config_dir = File.expand_path('../config', __FILE__)
DatabaseTasks.env = ENV['ENV'] || 'development'
@drogus
drogus / rvm.sh
Created April 13, 2013 13:53
Rails Girls snippets
curl -#L https://get.rvm.io | bash -s stable --autolibs=3 --ruby
@drogus
drogus / README.md
Last active December 14, 2015 10:10
Single Page Apps fight code snippets

I'm participating in a "Single Page Apps fight" on the wroclove.rb conference and we don't want to make too much noise with the slides, so here are a few snippets that may make it easier to understand my points.

@drogus
drogus / README.md
Created December 12, 2012 16:36 — forked from svenfuchs/README.md

In your Gemfile add:

group :development, :test do
  gem 'micro_migrations', :git => 'git@gist.github.com:33e9f92c229eb808a4fa.git'
end

You might want to add something like this to the Rakefile of apps that use a gem that uses micro_migrations:

ENV['SCHEMA'] = "#{Gem.loaded_specs['your-gem-name'].full_gem_path}/db/schema.rb"

#!/bin/bash
pushd /tmp
git clone https://github.com/travis-ci/travis-artifacts.git
cd travis-artifacts
gem build travis-artifacts.gemspec
gem install travis-artifacts*.gem
popd
@drogus
drogus / Gemfile
Created October 17, 2012 22:07
Rails Lightweight Stack. Most of this is detailed on Crafting Rails Applications - http://pragprog.com/book/jvrails/crafting-rails-applications
source :rubygems
# We are not loading Active Record, nor Active Resources etc.
# We can do this in any app by simply replacing the rails gem
# by the parts we want to use.
gem "actionpack", "~> 3.2"
gem "railties", "~> 3.2"
gem "tzinfo"
# Let's use thin
@drogus
drogus / expandable_record_array.coffee
Created August 30, 2012 14:31
Array for ember data that allows extending with findQuery results
DS.ExpandableRecordArray = DS.RecordArray.extend
isLoading: false
load: (array) ->
@set 'isLoading', true
self = this
observer = ->
if @get 'isLoaded'
content = self.get 'content'
@drogus
drogus / Gemfile
Created April 24, 2012 19:39
Router
gem "actionpack"
gem "thin"
@drogus
drogus / Gemfile
Created April 24, 2012 18:43
AbstractController
gem "actionpack"