This file contains hidden or 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
| [6] pry(main)> p.gimme :title | |
| => "Streetcar Feasibility Study" | |
| [7] pry(main)> |
This file contains hidden or 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 urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print 'Please restart Sublime Text to finish installation' |
This file contains hidden or 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
| ~/git/KAI/kittelson.com (master)> rake spec | |
| Resolved collector.newrelic.com to 204.93.223.153 | |
| /Users/tobi/.rvm/rubies/ruby-1.9.3-p125/bin/ruby -S rspec ./spec/helpers/application_helper_spec.rb ./spec/lib/searchable_spec.rb ./spec/mailers/website_mailer_spec.rb ./spec/models/announcement_spec.rb ./spec/models/candidate_spec.rb ./spec/models/employee_spec.rb ./spec/models/next_step_spec.rb ./spec/models/office_spec.rb ./spec/models/page_spec.rb ./spec/models/photo_spec.rb ./spec/models/project_spec.rb ./spec/models/setting_spec.rb ./spec/models/user_session_spec.rb ./spec/models/user_spec.rb ./spec/requests/admin_spec.rb ./spec/requests/candidates_spec.rb ./spec/requests/comment_spec.rb ./spec/requests/search_spec.rb | |
| Resolved collector.newrelic.com to 204.93.223.153 | |
| ...dyld: Library not loaded: /usr/local/lib/libtiff.3.dylib | |
| Referenced from: /usr/local/bin/identify | |
| Reason: image not found | |
| dyld: Library not loaded: /usr/local/lib/libtiff.3.dylib | |
| Referenced from: /usr/local/bin/identify | |
| Reason: image not |
This file contains hidden or 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
| require 'sequel' | |
| require 'builder' | |
| def export_comments_to_wxr(dbinfo) | |
| db = Sequel.connect("mysql2://#{dbinfo[:user]}:#{dbinfo[:pass]}@localhost/#{dbinfo[:dbname]}") | |
| comments = db[:posts].graph(:comments, :post_id=>:id).filter(:spam=>0).to_a | |
| posts = db[:posts].to_a | |
| xml = Builder::XmlMarkup.new(:target => STDOUT, :indent => 2) | |
| xml.rss :version=>"2.0", "xmlns:content" => "http://purl.org/rss/1.0/modules/content/", |
This file contains hidden or 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
| require 'csv' | |
| require 'sequel' | |
| def get_subscribers(filename) | |
| subscribers = [] | |
| CSV.foreach(File.expand_path(filename)) do |row| | |
| subscriber = {} | |
| subscriber[:name] = "#{row[0]} #{row[1]}" | |
| subscriber[:company] = row[2] | |
| subscriber[:email] = row[3] |
This file contains hidden or 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 ActionMailer::Base | |
| def perform_delivery_file(mail) | |
| File.open("#{RAILS_ROOT}/tmp/mails/#{mail.to}.html", 'a') { |f| f.write(mail) } | |
| end | |
| end | |
| config.action_mailer.delivery_method = :file |
This file contains hidden or 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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using Microsoft.Win32; | |
| namespace GetDotNetVersions | |
| { | |
| class Program | |
| { |
This file contains hidden or 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
| REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP" |
This file contains hidden or 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
| def blob_in_to_mm(s): | |
| return reduce(lambda l,r: l+" x "+r, map(str, map(lambda x: x*25.4, map(float, s.split(" x ")))), "")[3:-1] |