Skip to content

Instantly share code, notes, and snippets.

View amerine's full-sized avatar
🌅
Out West

Mark Turner amerine

🌅
Out West
View GitHub Profile
number of kegs = 9
keg = 15.5 gallons
size of pour = 12 US fl oz
keg price = $550
number of pours = (keg in US fl oz)/ size of pour
number of pours => 165.3333

Keybase proof

I hereby claim:

  • I am amerine on github.
  • I am amerine (https://keybase.io/amerine) on keybase.
  • I have a public key whose fingerprint is CB4D 6A5C 4ADF 7D60 0BCD AB97 5751 DA93 F930 E3E6

To claim this, I am signing this object:

@amerine
amerine / nova-ec2-policy-table.md
Last active August 29, 2015 13:58
Nova EC2 Actions and corresponding policy entries
Controller Actions Corresponding Policy
describe_availability_zones DescribeAvailabilityZones
describe_regions DescribeRegions
describe_snapshots DescribeSnapshots
create_snapshot missing
delete_snapshot missing
describe_key_pairs DescribeKeyPairs
create_key_pair CreateKeyPair
import_key_pair ImportKeyPair
@amerine
amerine / gist:10075858
Created April 8, 2014 00:09
latest openssl on ubuntu 12.04 for CVE-2014-0160 using ansbile
- name: ensure openssl is the latest version
apt: pkg=openssl state=latest update_cache=yes
tags: openssl
#View
<label for="searchtext">Search for a specific fighter:</label>
<%= text_field_with_auto_complete :fighter, :contains, { :size => 15 }, :skip_style => true -%>
<p>Search Results:</p>
<div id="fighter_name_results"></div>
#Controller
class ResourceController < ActionController::Base
def logger
@@logger ||= Logger.new("#{RAILS_ROOT}/log/my.log")
end
end
select au.auditstoryid, au.storyModifydate, a.authorFirstName, a.authorLastName, au.savemethod
from auditstory au
inner join authors a on au.modBy = a.authorId
where storyId = 1054 and storyModifyDate > SUBDATE(curdate(), 1)
class User
def self.highschooler
age_between(14, 18).in_school
end
end
map.resources :entries, :except => :new do |entry|
entry.resources :comments
entry.resources :votes
end
validate do |model_name|
model_name.errors.add_to_base("Type must not be blank") if model_name.template.blank?
end