Skip to content

Instantly share code, notes, and snippets.

View jeffkreeftmeijer's full-sized avatar
馃

Jeff Kreeftmeijer jeffkreeftmeijer

馃
View GitHub Profile
/Users/jeff/rails/rails_test_box/rails/actionpack/lib/action_view/template.rb:45:in `render'
/Users/jeff/rails/rails_test_box/rails/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/jeff/rails/rails_test_box/rails/activesupport/lib/active_support/notifications.rb:48:in `__send__'
/Users/jeff/rails/rails_test_box/rails/activesupport/lib/active_support/notifications.rb:48:in `instrument'
/Users/jeff/rails/rails_test_box/rails/actionpack/lib/action_view/template.rb:44:in `render'
/Users/jeff/rails/rails_test_box/rails/actionpack/lib/action_view/render/rendering.rb:58:in `_render_template'
/Users/jeff/rails/rails_test_box/rails/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/jeff/rails/rails_test_box/rails/activesupport/lib/active_support/notifications.rb:48:in `__send__'
/Users/jeff/rails/rails_test_box/rails/activesupport/lib/active_support/notifications.rb:48:in `instrument'
/Users/jeff/rails/rails_test_box/rails/actionpack/lib/act
require 'rubygems'
require 'zip/zip'
id = "123"
files = %w(file1.txt file2.txt)
Zip::ZipFile.open("#{id}.zip", Zip::ZipFile::CREATE) do |zipfile|
files.each do |file|
zipfile.get_output_stream("#{id}/#{file}") { |f| f.puts file }
end
<form id="guestCommand" method="POST" action="https://cas.hilton.com/cas/en_US/dt/access.do">
<input type="hidden" name="selectedPricePlanId" value="18931" />
<input type="hidden" name="payMethod" value="CT" />
<input type="submit" value="Connect" />
</form>
HTTParty.post(
'https://cas.hilton.com/cas/en_US/dt/access.do',
:query => {
'selectedPricePlanId' => '18931',
'payMethod' => 'CT'
}
)
.mouse, #preview{
position: absolute;
background-repeat: no-repeat;
height: 22px;
min-width: 15px;
z-index: 100;
}
.mouse{
background-image: url('../images/cursor.png');
!!!
%html
%head
%title YourAwesomeApp
= stylesheet_link_tag :all
= javascript_include_tag :defaults
= csrf_meta_tag
%body
= yield
class Hash
def subset_including(*keys)
Hash[ select{ |key, value| keys.include? key } ]
end
def subset_excluding(*keys)
Hash[ select{ |key, value| !keys.include? key } ]
end
alias_method :subset, :subset_including
require 'rubygems'
require 'mechanize'
require 'httparty'
# Ugly code, for an ugly hack.
# Hey, if Lighthouse didn't suck then none of this would happen.
# It's been lotsa fun coding it though, so I suppose I should be thankful for the "opportunity"
require 'rubygems'
require 'mechanize'
require 'httparty'
# Ugly code, for an ugly hack.
# Hey, if Lighthouse didn't suck then none of this would happen.
# It's been lotsa fun coding it though, so I suppose I should be thankful for the "opportunity"