Install iodbc /usr fix for Mac, third link
http://www.iodbc.org/dataspace/iodbc/wiki/iODBC/Downloads#Mac_OS_X
Now you build psqlODBC
curl http://ftp.postgresql.org/pub/odbc/versions/src/psqlodbc-09.03.0210.tar.gz -o psqlodbc-09.03.0210.tar.gz
tar -xzf psqlodbc-09.03.0210.tar.gz
cd psqlodbc-09.03.0210.tar.gz
./configure --with-iodbc=/usr/local/iODBC/ --enable-pthreads --without-libpq
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
| -- KEYS[1] namespace/key | |
| -- ARGV[1] current timestamp | |
| -- ARGV[2] max uses per second | |
| local t = tonumber(redis.call("get", KEYS[1] .. ":t")) or 0 | |
| local c = tonumber(redis.call("get", KEYS[1] .. ":c")) or 0 | |
| local current = tonumber(ARGV[1]) | |
| local max = tonumber(ARGV[2]) | |
| if current - t >= 1 then | |
| redis.call("mset", KEYS[1] .. ":t", current, KEYS[1] .. ":c", 1) | |
| return {current, 1, 1} |
- body file path:
%s/\(body\: \)\(File.\+\)\(Rails\.root\), \([^)]\+\))/\1\3.join(\4/g - headers top-level:
%s/\(content_type\:[^,)]\+\)/headers: { \1 }/g bundle exec rspec `git status --porcelain | sed -e "s/ M /.\//" | grep "spec\.rb"`
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
| # will look into all method call in instances of given class | |
| module Probe | |
| def self.instances(klass, opts = {}) | |
| methods = if opts.is_a?(Array) | |
| opts | |
| else | |
| methods_list(klass, opts) | |
| end | |
| methods.uniq.each do |m| |
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
| - http://www.creativitypost.com/create/banish_excuses_and_boost_your_mood_to_feel_more_creative | |
| A good mood is the best way to boost creativity, and here are some tips on how to get to a good mood |
DatabaseConfig.Engineshould control which engine is initialized forpushDatabaseOpts, and not be validated inside the engine driver as it currently is- why should the db wrapper (
pushDatabaseOpts) control locks when each engine has different lock mechanisms and requirements that may or may not allow things to be written and read at the same time. Shouldn't that go into the engine driver?
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
| redis = Redis.current | |
| key = "resque:queue:bulk" | |
| total = redis.llen(key) | |
| batch = [] | |
| total.times do |i| | |
| entry = redis.lpop(key) | |
| batch << entry | |
| if batch.size == 1000 | |
| puts "re-inserting batch..." |
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
| https://github.com/ollieglass/share-counter/blob/master/lib/share-counter.rb | |
| https://urls.api.twitter.com/1/urls/count.json?url=http://www.getmdl.io/&callback=foo | |
| https://api.facebook.com/method/fql.query?format=json&query=select%20share_count%20from%20link_stat%20where%20url=%22http://www.getmdl.io/%22&callback=foo | |
| https://www.linkedin.com/countserv/count/share?url=http://www.getmdl.io/&callback=foo | |
| https://gist.github.com/jonathanmoore/2640302#google-plus | |
| https://gist.github.com/michielvaneerd/5989839 |
