Skip to content

Instantly share code, notes, and snippets.

@nurey
nurey / gist:3130172
Created July 17, 2012 15:40 — forked from kbaum/gist:892247
prune_workers_from_terminated_instance.rb
module Resque
def self.unregister_workers_for_host(host)
Resque.workers.select{|worker| worker.id.split(':').first==host}.each(&:unregister_worker)
end
end
Resque.unregister_workers_for_host("ip-10-250-192-51")
qua:cache-warmer ilia$ rvm install jruby-1.7.0.preview1
jruby-1.7.0.preview1 - #fetching
jruby-1.7.0.preview1 - #extracted to /Users/ilia/.rvm/src/jruby-1.7.0.preview1 (already extracted)
Building Nailgun
jruby-1.7.0.preview1 - #installing to /Users/ilia/.rvm/rubies/jruby-1.7.0.preview1
jruby-1.7.0.preview1 - adjusting #shebangs for (jrubyc jirb_swing jirb jgem rdoc ri spec autospec testrb ast generate_yaml_index.rb).
jruby-1.7.0.preview1 - #importing default gemsets (/Users/ilia/.rvm/gemsets/)
qua:cache-warmer ilia$ rvm use jruby-1.7.0.preview1
Using /Users/ilia/.rvm/gems/jruby-1.7.0.preview1
qua:cache-warmer ilia$ rvm gemset list
[alias]
co = checkout
br = branch
ci = commit
st = status
last = log -1 HEAD
$ perl Makefile.PL
include /Users/ilia/Devel/carton/inc/Module/Install.pm
include inc/Module/Install/Metadata.pm
include inc/Module/Install/Base.pm
include inc/Module/Install/Makefile.pm
Unknown function is found at Makefile.PL line 9.
Execution of Makefile.PL aborted due to runtime errors.
If you're a contributor to a project, you may need to install
some Module::Install extensions from CPAN (or other repository).
var socket = chrome.socket || chrome.experimental.socket;
var socketInfo;
var connected = false;
socket.create('udp', {}, function(createInfo) {
socketInfo = createInfo;
socket.connect(socketInfo.socketId, '127.0.0.1', 5555, function(connectResult) {
connected = (connectResult == 0);
console.log(connected ? "connected" : "not connected");
socket.read(socketInfo.socketId, function(readInfo) {
[2012-12-03 11:15:45AM] No connect attempt: in connect attempt loop.
[2012-12-03 11:15:45AM] [osc_tell] /pod/state string: <<bt_connected>> [/osc_tell]
[2012-12-03 11:15:45AM] [osc_tell] /pod/state string: <<bt_connected>> [/osc_tell]
[2012-12-03 11:15:45AM] Device #0 (I): EXCODE level: 0 CODE: 0x80 vLength: 12 Data value(s): EE 08 00 00 08 00 00 05 00 00 F8 1F
[2012-12-03 11:15:45AM] Device #0 (I): EXCODE level: 0 CODE: 0x80 vLength: 12 Data value(s): EE 08 00 00 08 00 00 04 00 00 F8 1F
[2012-12-03 11:15:45AM] Device #0 (I): EXCODE level: 0 CODE: 0x80 vLength: 12 Data value(s): EE 08 00 00 08 00 00 04 00 00 F8 1F
[2012-12-03 11:15:46AM] Device #0 (I): EXCODE level: 0 CODE: 0x80 vLength: 12 Data value(s): EE 08 00 00 08 00 00 03 00 00 F8 1F
[2012-12-03 11:15:46AM] Device #0 (I): EXCODE level: 0 CODE: 0x80 vLength: 12 Data value(s): EE 08 00 00 08 00 00 08 00 00 F8 1F
[2012-12-03 11:15:46AM] Device #0 (I): EXCODE level: 0 CODE: 0x80 vLength: 12 Data value(s): EE 08 00 00 08 00 00 08 00 00 F8 1F
[2012-12-
qua:irs ilia$ bundle exec rake figaro:heroku[irs] --trace
** Invoke figaro:heroku (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute figaro:heroku
/Users/ilia/.rvm/gems/ruby-2.0.0-p0@irs/gems/bundler-1.3.0/lib/bundler/definition.rb:361:in `validate_ruby!': Your Ruby version is 1.9.3, but your Gemfile specified 2.0.0 (Bundler::RubyVersionMismatch)
from /Users/ilia/.rvm/gems/ruby-2.0.0-p0@irs/gems/bundler-1.3.0/lib/bundler.rb:116:in `setup'
from /Users/ilia/.rvm/gems/ruby-2.0.0-p0@irs/gems/bundler-1.3.0/lib/bundler/setup.rb:17:in `<top (required)>'
from /usr/local/heroku/ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/local/heroku/ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
@nurey
nurey / cocos2d.podspec
Created March 25, 2013 22:56
Podspec for cocos2d 2.1.beta3. There's not an official podspec for this version.
Pod::Spec.new do |s|
s.name = 'cocos2d'
s.license = 'MIT'
s.version = '2.1.beta3'
s.summary = 'cocos2d for iPhone is a framework for building 2D games, demos, and other graphical/interactive applications.'
s.description = 'cocos2d for iPhone is a framework for building 2D games, demos, and other graphical/interactive applications for iPod Touch, iPhone, iPad and Mac. It is based on the cocos2d design but instead of using python it, uses objective-c.'
s.homepage = 'http://www.cocos2d-iphone.org'
s.author = { 'Ricardo Quesada' => '[email protected]', 'Zynga Inc.' => 'https://zynga.com/' }
s.source = {:git => 'https://github.com/cocos2d/cocos2d-iphone.git', :tag => 'release-2.1-beta3'}
SELECT "places".* FROM (
SELECT
*,
ST_Distance_Sphere(geom, 'SRID=4326;POINT(-79.3937393 43.6526704)') as distance
FROM places
ORDER by geom <#> 'SRID=4326;POINT(-79.3937393 43.6526704)' LIMIT 50
) AS places
WHERE "places"."place_category_id" = 10 ORDER BY distance ASC LIMIT 5
@nurey
nurey / gist:9916489
Last active August 29, 2015 13:57
watchman --persistent --server-encoding=json log-level debug
{
"version": "2.9.5",
"log": "1396365899: tid=211292160 notify_thread[/Users/ilia/Devel/angularjs-imageupload-directive/src] assessing triggers\n"
}
{
"version": "2.9.5",
"log": "1396365899: tid=211292160 notify_thread[/Users/ilia/Devel/angularjs-imageupload-directive/src] assessing triggers\n"
}
{
"version": "2.9.5",