Skip to content

Instantly share code, notes, and snippets.

View towski's full-sized avatar

towski towski

  • San Francisco, California
View GitHub Profile
@towski
towski / gist:5032770
Created February 25, 2013 20:02
sendgrid removing blocks
curl "https://sendgrid.com/api/unsubscribes.delete.json?api_user=username&api_key=password&email=devmessages@kongregate.com"
info: Welcome to Nodejitsu towski
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
warn:
warn: Your package.json file is missing required fields:
warn:
warn: scripts.start
warn:
warn: Prompting user for required fields.
warn: Press ^C at any time to quit.
<fieldType name="tag" class="solr.TextField">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StandardFilterFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StandardFilterFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
8.470001 = (MATCH) sum of:
5.2308245 = (MATCH) max of:
5.2308245 = (MATCH) sum of:
0.50882924 = (MATCH) weight(title_text_ngram:but in 24457), product of:
0.051065523 = queryWeight(title_text_ngram:but), product of:
5.7528577 = idf(docFreq=1188, maxDocs=137823)
0.008876549 = queryNorm
9.964242 = (MATCH) fieldWeight(title_text_ngram:but in 24457), product of:
1.7320508 = tf(termFreq(title_text_ngram:but)=3)
5.7528577 = idf(docFreq=1188, maxDocs=137823)
@towski
towski / sql timeout
Created March 28, 2012 05:30
sql timeout
# ActiveRecord::Base.connection.timeout(20, []) do |connection|
# worrisome sql
# end
module ActiveRecord
class TimeoutError < ActiveRecordError
def initialize(message = nil)
super(message)
end
end
java -XstartOnFirstThread -d32 -client -Xmx500m -Xss1024k -jar /Users/towski/.selenium/assets/selenium-2.0b3/selenium-server-standalone-2.0b3.jar
11:34:47.952 INFO - Java: Apple Inc. 17.1-b03-307
11:34:47.954 INFO - OS: Mac OS X 10.6.5 i386
11:34:47.961 INFO - v2.0 [b3], with Core v2.0 [b3]
11:34:48.101 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
11:34:48.103 INFO - Version Jetty/5.1.x
11:34:48.104 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
11:34:48.104 INFO - Started HttpContext[/selenium-server,/selenium-server]
11:34:48.105 INFO - Started HttpContext[/,/]
11:34:48.257 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@949f69
require 'benchmark'
string = <<-EOF
/Users/towski/engineering/kongregate/vendor/gems/stopdropandrew-activemerchant-1.4.2/lib
/Users/towski/engineering/kongregate/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3
/Users/towski/engineering/kongregate/test/mocks/test
/Users/towski/engineering/kongregate/app/controllers/
/Users/towski/engineering/kongregate/app
/Users/towski/engineering/kongregate/app/models
/Users/towski/engineering/kongregate/app/controllers
@towski
towski / diff
Created November 10, 2010 01:26
diff --git a/vendor/rails/activesupport/lib/active_support/dependencies.rb b/vendor/rails/activesupport/lib/active_support/dependencies.rb
index 2badad5..f95de5d 100644
--- a/vendor/rails/activesupport/lib/active_support/dependencies.rb
+++ b/vendor/rails/activesupport/lib/active_support/dependencies.rb
@@ -411,7 +411,9 @@ module ActiveSupport #:nodoc:
from_mod = Object if from_mod.name.blank?
unless qualified_const_defined?(from_mod.name) && from_mod.name.constantize.object_id == from_mod.object_id
- raise ArgumentError, "A copy of #{from_mod} has been removed from the module tree but is still active!"
+ # assume we should just use the new constant instead of the old
Building native extensions. This could take a while...
ERROR: Error installing ruby-debug-base19:
ERROR: Failed to build gem native extension.
/Users/towski/.rvm/rubies/ruby-1.9.1-p378/bin/ruby extconf.rb
checking for rb_method_entry_t.body in method.h... no
checking for vm_core.h... no
checking for rb_method_entry_t.body in method.h... no
checking for vm_core.h... yes
checking for iseq.h... yes
Wrote 104857800 bytes in 20026ms using 1024 byte buffers: 4.993508439029262 mB/s
Wrote 104857800 bytes in 19872ms using 4096 byte buffers: 5.032206119162641 mB/s
Wrote 104857800 bytes in 21407ms using 8192 byte buffers: 4.671369178306161 mB/s
Wrote 104857800 bytes in 19472ms using 16384 byte buffers: 5.135579293344289 mB/s
Wrote 104857800 bytes in 19773ms using 32768 byte buffers: 5.0574015071056495 mB/s
Wrote 104857800 bytes in 19578ms using 65536 byte buffers: 5.10777403207682 mB/s