This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * add this to your own css file, | |
| * to overwrite the _chosen_ styling, to look more like bootstrap! | |
| * | |
| * note: for the error part to work, an .error class-name must be added | |
| * to a wrapping DIV, to display the bootstrap error styling. I have | |
| * just use the wrapping .control-group DIV | |
| * | |
| * credit: Rasmus Burkal, @rabu81 | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'yaml' | |
| require 'logger' | |
| require 'active_record' | |
| namespace :db do | |
| def create_database config | |
| options = {:charset => 'utf8', :collation => 'utf8_unicode_ci'} | |
| create_db = lambda do |config| | |
| ActiveRecord::Base.establish_connection config.merge('database' => nil) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| git diff --numstat | awk '{if ($1 == "0" && $2 == "0") print $3}' | xargs git checkout HEAD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Author: Pieter Noordhuis | |
| # Description: Simple demo to showcase Redis PubSub with EventMachine | |
| # | |
| # Update 7 Oct 2010: | |
| # - This example does *not* appear to work with Chrome >=6.0. Apparently, | |
| # the WebSocket protocol implementation in the cramp gem does not work | |
| # well with Chrome's (newer) WebSocket implementation. | |
| # | |
| # Requirements: | |
| # - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| sudo rmmod psmouse && sudo modprobe psmouse |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Tint2 config file | |
| # Generated by tintwizard (http://code.google.com/p/tintwizard/) | |
| # For information on manually configuring tint2 see http://code.google.com/p/tint2/wiki/Configure | |
| # Background definitions | |
| # ID 1 | |
| rounded = 3 | |
| border_width = 0 | |
| #background_color = #000000 60 | |
| background_color = #000000 80 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # Script to create and download a database backup on Heroku | |
| # Written by Chris Stefano (https://github.com/virtualstaticvoid) | |
| # | |
| # See http://devcenter.heroku.com/articles/pgbackups for details | |
| # | |
| appname=$1 | |
| filename=${appname}_db_$(date +%Y%m%d)_$(date +%H%M).pg_backup |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # CQRS+ES Domain DSL | |
| class Symbol | |
| def snake_case | |
| to_s.gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2'). | |
| gsub(/([a-z\d])([A-Z])/, '\1_\2'). | |
| tr("-", "_"). | |
| downcase.to_sym | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| user nginx; | |
| worker_processes 5; | |
| error_log /var/log/nginx.error.log; | |
| pid /var/run/nginx.pid; | |
| events { | |
| worker_connections 1024; | |
| } | |