This file contains 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
import base64 | |
import requests | |
import os | |
from twilio.rest import Client | |
CHAIN_API="https://medalla.beaconcha.in" | |
COUNTRY_CODE="+1" | |
FAILURE_THRESHOLD=100 | |
def check_validator(event, context): |
This file contains 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
class RowCounter | |
def self.checkpoint | |
@counter_collection ||= [] | |
@counter_collection << RowCounter.new | |
@counter_collection[-1] - @counter_collection[-2] | |
end | |
def initialize | |
census |
This file contains 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
/Users/austin/.rvm/gems/ruby-2.0.0-p195@myapp/gems/capistrano-2.15.4/lib/capistrano/configuration/variables.rb:82:in `block in fetch': `rvm_ruby_string_evaluated' not found (IndexError) | |
from /Users/austin/.rvm/gems/ruby-2.0.0-p195@myapp/gems/capistrano-2.15.4/lib/capistrano/configuration/variables.rb:110:in `block in protect' | |
from /Users/austin/.rvm/gems/ruby-2.0.0-p195@myapp/gems/capistrano-2.15.4/lib/capistrano/configuration/variables.rb:110:in `synchronize' | |
from /Users/austin/.rvm/gems/ruby-2.0.0-p195@myapp/gems/capistrano-2.15.4/lib/capistrano/configuration/variables.rb:110:in `protect' | |
from /Users/austin/.rvm/gems/ruby-2.0.0-p195@myapp/gems/capistrano-2.15.4/lib/capistrano/configuration/variables.rb:78:in `fetch' | |
from /Users/austin/.rvm/gems/ruby-2.0.0-p195@myapp/gems/capistrano-2.15.4/lib/capistrano/configuration/namespaces.rb:191:in `method_missing' | |
from /Users/austin/.rvm/gems/ruby-2.0.0-p195@myapp/gems/rvm-capistrano-1.4.0.rc2/lib/rvm/capistrano/install_ruby.rb:35:in `block (3 levels) in <top |
This file contains 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
i ran into a weird issue with block comments and indentation. Following code blows up on compile: | |
publish: -> | |
"foo" | |
### | |
Any random text | |
### | |
Server: {} |
This file contains 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
irb> ObjectSpace.each_object { |o| puts o if o.respond_to?(:ancestors) and o.ancestors.include?(Enumerable) } | |
Enumerable::Enumerator | |
Struct::Tms | |
Dir | |
File | |
IO | |
Range | |
Struct | |
Hash |
This file contains 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
# from lib / import_from_marshal.rb | |
def self.load | |
data = Marshal.load(`bzcat #{Rails.root}/private/rockwood_legacy.marshal.bz2`) | |
t = LegacyTraining.new | |
t.add_questions | |
@@txt_questions = t.text_questions | |
@@num_questions = t.numeric_questions | |
@@answers = 0 | |
# numeric_questions = t.numeric_questions.sort(&:order) | |
# text_questions = t.text_questions.sort(&:order) |
This file contains 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
/** | |
* windowName transport plugin for jQuery | |
* | |
* Thanks to Kris Zyp <http://www.sitepen.com/blog/2008/07/22/windowname-transport/> | |
* for the original idea and some code | |
* | |
* Licensed under GPLv3: http://www.gnu.org/licenses/gpl-3.0.txt | |
* @author Marko Mrdjenovic <[email protected]> | |
* | |
* @author Austin Putman <austin hat radicaldesigns dhot org> |
This file contains 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
/** | |
* windowName transport plugin for jQuery | |
* | |
* Thanks to Kris Zyp <http://www.sitepen.com/blog/2008/07/22/windowname-transport/> | |
* for the original idea and some code | |
* | |
* Licensed under GPLv3: http://www.gnu.org/licenses/gpl-3.0.txt | |
* @author Marko Mrdjenovic <[email protected]> | |
* | |
* @author Austin Putman <austin hat radicaldesigns dhot org> |
This file contains 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
--- | |
public/javascripts/jquery/jquery-1.2.6.js | 6 +++++- | |
1 files changed, 5 insertions(+), 1 deletions(-) | |
diff --git a/public/javascripts/jquery/jquery-1.2.6.js b/public/javascripts/jquery/jquery-1.2.6.js | |
index 88e661e..5db150d 100644 | |
--- a/public/javascripts/jquery/jquery-1.2.6.js | |
+++ b/public/javascripts/jquery/jquery-1.2.6.js | |
@@ -2566,6 +2566,9 @@ jQuery.extend({ | |
data: null, |
This file contains 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
s.data = s.data + '&' + $('form.link_form').serialize(); | |
<% form_for :all_links, :url => '/some/route', :html => { :class => 'hidden link_form' } do |f| %> | |
| |
<% end %> |