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
t.prefs_.set('color-palette-overrides',[ | |
"#626262", | |
"#ff8373", | |
"#b4fb73", | |
"#fffdc3", | |
"#a5d6ff", | |
"#ff90ff", | |
"#d1d2ff", | |
"#f1f1f1", | |
"#ffc4be", |
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
DbCharmer.force_slave_reads do | |
# all read operations againt ActiveRecord objects will now | |
# go against the read slaves. this extends to calls on | |
# ActiveRecord objects in nested function calls. | |
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
require 'db_charmer' | |
class ActiveRecord::Base | |
extend AdStage::Logger | |
include AdStage::Logger | |
db_magic :slaves => (SLAVE_DB_CONNECTIONS.empty? ? [connection] : SLAVE_DB_CONNECTIONS), :force_slave_reads => false | |
log(:warn, "no slave databases connected") if SLAVE_DB_CONNECTIONS.empty? | |
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
SLAVE_DB_CONNECTIONS = (ENV['SLAVE_DATABASE_URLS'] || '').split(',').map do |db_url| | |
ENV[db_url] && Class.new(ActiveRecord::Base) { establish_connection(ENV[db_url]) }.connection | |
end.compact |
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
gem 'db-charmer', '~>1.9.0' |
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
" Vim syntax file | |
" Language: Clojure | |
" Maintainer: Toralf Wittner <[email protected]> | |
" modified by Meikel Brandmeyer <[email protected]> | |
" modified by G Gordon Worley III <[email protected]> | |
" URL: http://kotka.de/projects/clojure/vimclojure.html | |
" this version does not depend on other clojure plugins | |
if version < 600 | |
syntax clear |
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
" Vim color file | |
" Maintainer: G Gordon Worley III <[email protected]> | |
" Based on the desert256 theme by Henry So, Jr. <[email protected]> | |
" | |
" Essentially a copy of desert256 with some added styles in place of using | |
" defaults so that it behaves well with terminal color schemes. Only tested | |
" in 256 color terminal. Mainly done to make diff usable. | |
" | |
" The desert256 info comments: | |
" |
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/sh | |
#based on https://raw.github.com/richoH/dotfiles/master/bin/battery | |
#displays 100% when battery is full | |
#hearts fill from the left rather than the right, video game style | |
HEART_FULL=♥ | |
HEART_EMPTY=♡ | |
[ -z "$NUM_HEARTS" ] && | |
NUM_HEARTS=5 |