I hereby claim:
- I am aaronmoodie on github.
- I am aaronmoodie (https://keybase.io/aaronmoodie) on keybase.
- I have a public key whose fingerprint is 483E 8F5F FF31 3295 C283 5C41 5D7A 299A 0864 1366
To claim this, I am signing this object:
# Generate stats for journal files | |
require 'date' | |
stats = { | |
total_files: 0, | |
word_count: 0, | |
late_entry: 0, | |
} |
# Diff two email lists and find new and missing emails | |
# To use, call file and pass in an original list and updated list | |
# eg. ruby email_list_diff.rb ~/original_list.txt ~/updated_list.txt | |
original_list = File.readlines(ARGV[0]) | |
updated_list = File.readlines(ARGV[1]) | |
def find_unique_emails(list_01, list_02) | |
# given two email lists, find all emails | |
# in list_01 that are not in list_02 |
# Find and modify all rem values | |
# To use, call file and pass in CSS dir | |
# eg. ruby rem_replace.rb ~/my_css_files | |
dir = ARGV[0] | |
Dir.glob(dir + '/*.css') do |css_file| | |
# do work on files ending in .css in the desired directory | |
puts "working on: #{css_file}..." | |
I hereby claim:
To claim this, I am signing this object:
if request.xhr? | |
# renders :template_partial without layout.html | |
erb :template_partial, :layout => false | |
else | |
# renders as normal inside layout.html | |
erb :template_partial | |
end |
➜ ~ ping duckduckgo.com | |
PING duckduckgo.com (46.51.216.186): 56 data bytes | |
64 bytes from 46.51.216.186: icmp_seq=0 ttl=47 time=493.049 ms | |
64 bytes from 46.51.216.186: icmp_seq=1 ttl=47 time=358.478 ms | |
64 bytes from 46.51.216.186: icmp_seq=2 ttl=47 time=357.297 ms | |
64 bytes from 46.51.216.186: icmp_seq=3 ttl=47 time=358.935 ms | |
64 bytes from 46.51.216.186: icmp_seq=4 ttl=47 time=469.308 ms | |
64 bytes from 46.51.216.186: icmp_seq=5 ttl=47 time=358.160 ms | |
64 bytes from 46.51.216.186: icmp_seq=6 ttl=47 time=358.421 ms | |
64 bytes from 46.51.216.186: icmp_seq=7 ttl=47 time=357.605 ms |
class Show < ActiveRecord::Base | |
attr_accessible :artist_tokens, :cost, :booking_url, :door_charge, :venue_id, :date, :time, :starts_at | |
attr_reader :artist_tokens, :date, :time | |
validate :is_time | |
validate :is_date | |
before_save :save_date_and_time | |
has_many :performances | |
has_many :artists, :through => :performances |
[5] pry(main)> file = TagLib::MPEG::File.new('taro.mp3') | |
=> #<TagLib::MPEG::File:0x007f852353ec88 @__swigtype__="_p_TagLib__MPEG__File"> | |
[6] pry(main)> tag = file.tag | |
=> #<TagLib::Tag:0x007f852350a870 @__swigtype__="_p_TagLib__Tag"> | |
[7] pry(main)> puts "#{file}: #{tag.title} by #{tag.artist}; track #{tag.track} on #{tag.album}" | |
#<TagLib::MPEG::File:0x007f852353ec88>: Taro by alt-J; track 13 on An Awesome Wave | |
=> nil | |
[8] pry(main)> |
1.9.2p290 :002 > require 'taglib' | |
=> true | |
1.9.2p290 :003 > TagLib::MPEG::File.new('taro.mp3') do |file| | |
1.9.2p290 :004 > tag = file.tag | |
1.9.2p290 :005?> puts "#{file}: #{tag.title} by #{tag.artist}; track #{tag.track} on #{tag.album}" | |
1.9.2p290 :006?> end | |
=> #<TagLib::MPEG::File:0x007f9cea923770> |
# html | |
# place under div.email (92) | |
<div class="gifts-newsletter"> | |
<input type="checkbox" name="etsy_gift" id="etsy_gift"> <label for="etsy_gift">I'd also like great gift ideas from Etsy.</label> | |
</div> | |
# css | |
# place under form div.email (314) | |
.reminder p { |