Skip to content

Instantly share code, notes, and snippets.

View mattly's full-sized avatar
💭
I may be slow to respond.

Matthew Lyon mattly

💭
I may be slow to respond.
View GitHub Profile
@mattly
mattly / languages.md
Last active April 2, 2019 22:09 — forked from joshsusser/languages.md
languages I've been paid to program in
  1. AppleScript
  2. bash
  3. Clojure
  4. ClojureScript
  5. CoffeeScript
  6. Datalog
  7. Elixir
  8. Elm
  9. Erlang
  10. Filemaker Pro
@mattly
mattly / tweettrim.rb
Last active March 21, 2016 19:37 — forked from robinsloan/langoliers.rb
Rolling Tweet Deletion
#!/usr/bin/env ruby
require 'rubygems'
require 'twitter'
require 'json'
require 'faraday'
# things you must configure
TWITTER_USER = "you"
# get these from dev.twitter.com
@mattly
mattly / tweetnuke.rb
Last active August 29, 2015 14:16 — forked from robinsloan/langoliers.rb
nuke your twitter history
#!/usr/bin/env ruby
# Modified from https://gist.github.com/robinsloan/3688616
# This version will nuke your entire twitter history past a certain threshold.
# It requires you to download your archive from twitter and put "tweets.csv"
# in the same directory as this script.
require 'rubygems'
require 'twitter'
require 'json'
require 'faraday'
require 'csv'
$.fn.googleMap = function(address, options) {
var defaults = {
zoom: 14,
mapTypeId: google.maps.MapTypeId.HYBRID
}
options = $.extend(defaults, options || {});
var map = new google.maps.Map(this[0], $.extend(options, {
center: new google.maps.LatLng(44.081996, -123.0286928),
}));
require 'time'
require 'date'
STAMP = "2009/06/29 23:19:35 +0000"
class Time
def self.parse_utc(string)
string =~ /(\d{4})\/(\d{2})\/(\d{2}) (\d{2}):(\d{2}):(\d{2})/
utc($1, RFC2822_MONTH_NAME[$2.to_i - 1], $3, $4, $5, $6)
end

HOWTO: iPhone AT&T Tethering

In 10 steps:

  • Update iTunes to 8.2 via Software Update
  • Update your iPhone to the 3.0 release (out today - June 17th)
  • Download this dmg and mount it: tethering file
  • Enable hidden carrier testing option (in Terminal.app): defaults write com.apple.iTunes carrier-testing -bool TRUE
  • Start up iTunes
@mattly
mattly / gist:4933
Created August 11, 2008 20:19 — forked from mmower/gist:4932
def note_to_freq( note_num )
base_note_num = note_num - 69
440.0 * Math.exp( 0.057762265 * ( note_num - 69 ) )
end
60.upto(72) {|n| puts note_to_freq(n) / note_to_freq(60) }
1.0
1.05946309430986 # 61, C#
1.12246204820462 # 62, D
1.18920711483625 # 63, D#