Skip to content

Instantly share code, notes, and snippets.

@drogus
drogus / test.html
Created Nov 11, 2013
backburner memory bug test
View test.html
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Ember schedule CPU usage" />
<meta charset=utf-8 />
<title>Ember Starting Point</title>
<script src="backburner.js"></script>
</head>
<body>
View travis.yml
# found in excellent post at: http://reefpoints.dockyard.com/ruby/2013/03/29/running-postgresql-9-2-on-travis-ci.html
before_install:
- sudo /etc/init.d/postgresql stop
- sudo cp /etc/postgresql/9.1/main/pg_hba.conf ./
- sudo apt-get remove postgresql postgresql-9.1 -qq --purge
- source /etc/lsb-release
- echo "deb http://apt.postgresql.org/pub/repos/apt/ $DISTRIB_CODENAME-pgdg main" > pgdg.list
- sudo mv pgdg.list /etc/apt/sources.list.d/
- wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -
@drogus
drogus / travis.yml
Created Nov 4, 2013
install sqlite3 3.7.13 on travis
View travis.yml
before_install:
- curl -O http://mirrors.kernel.org/ubuntu/pool/main/s/sqlite3/libsqlite3-0_3.7.13-1_amd64.deb
- curl -O http://mirrors.kernel.org/ubuntu/pool/main/s/sqlite3/sqlite3_3.7.13-1_amd64.deb
- sudo dpkg -i libsqlite3-0_3.7.13-1_amd64.deb sqlite3_3.7.13-1_amd64.deb
View deploy.example.yml
deploy:
- provider: heroku
api_key: ...
app: staging-app
on:
branch: master
- provider: heroku
api_key: ...
app: production_app
on:
View gist:6184061
{
"payload": {
"id": 1,
"number": 1,
"status": null,
"started_at": null,
"finished_at": null,
"status_message": "Passed",
"commit": "62aae5f70ceee39123ef",
"branch": "master",
@drogus
drogus / rvm.sh
Created Apr 13, 2013
Rails Girls snippets
View rvm.sh
curl -#L https://get.rvm.io | bash -s stable --autolibs=3 --ruby
@drogus
drogus / README.md
Last active Dec 14, 2015
Single Page Apps fight code snippets
View README.md

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.

View 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"

View install-artifacts.sh
#!/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 Oct 17, 2012
Rails Lightweight Stack. Most of this is detailed on Crafting Rails Applications - http://pragprog.com/book/jvrails/crafting-rails-applications
View Gemfile
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