Skip to content

Instantly share code, notes, and snippets.

View mnutt's full-sized avatar

Michael Nutt mnutt

View GitHub Profile
@mnutt
mnutt / gist:9937805
Last active February 2, 2018 16:45
Determining URL schemes of an iTunes app
  1. Get The Unarchiver (compression utility) here: https://theunarchiver.com/
  2. Opens iTunes for Mac and download the app from the app store
  3. Open Finder and navigate to Music/iTunes/iTunes Media/Mobile Applications
  4. Select the application you downloaded, and drag it into The Unarchiver to extract it
  5. Navigate into the extracted directory, then into Payload, and you should see an app
  6. Right-click the app and select "Show Package Contents"
  7. Find the file "Info.plist", right-click it and select "Quick Look"
  8. Look through the file for CFBundleURLSchemes (it'll be indented)
  9. Right below that should be , with each URL scheme inside a tag.
@mnutt
mnutt / README.md
Last active December 26, 2015 06:59
Chalk drawer simulation

Update the rope lengths using update(leftLength, rightLength).

@mnutt
mnutt / example.hbs
Created August 25, 2013 19:56
Ember Modal Component test. The component takes a 'title' property and generates a button. When you click the button, it creates a dynamic child view appended to the body yielding whatever content was passed into the component block.
{{#modal-popup title="Edit Pic"}}
<!-- this goes inside the modal -->
<div class='pic'>
<div class="form">
{{input value=pic.url}}
</div>
</div>
{{/modal-popup}}
@mnutt
mnutt / concurrency_limiter.coffee
Created July 15, 2013 23:35
Simple node.js concurrency limiter
# Limits concurrency to @limit requests at any given time.
#
# Every time limiter.run() is called, concurrent load is incremented by one and
# the function you pass into it is called with a single argument of the 'done'
# function. When your work is complete, call the 'done' function and the
# concurrent load will be decremented by one.
#
# Usage:
#
# ConcurrencyLimiter = require('limiter')
@mnutt
mnutt / scraper.rb
Created June 20, 2013 02:31
Grabs streeteasy.com listings based on availability dates and reformats.
#!/usr/bin/env ruby
require 'mechanize'
require 'yaml'
unless ARGV[0] =~ /^http/ && ARGV[1] =~ /(now|[\d\/]+)/
puts "Usage: scraper.rb [streeteasy search URL] [date(s)]"
puts " streeteasy search url: just perform a search on streeteasy.com"
puts " and grab the URL from the location bar"
puts ""
var util = require('util');
var Stream = require('stream');
function CachedStream() {
this.buffers = [];
this.readable = true;
this.writable = true;
}
CachedStream.prototype.write = function(buffer) {
Stream = require 'stream'
class CachedStream extends Stream
constructor: ->
@buffers = []
readable: true
writable: true
write: (buffer) ->

HUMMINGBIRD DOCS TODO

Running hummingbird locally

  • git clone hummingbird
  • install geoip
  • npm install
  • node server.js
@mnutt
mnutt / gist:3362233
Created August 15, 2012 18:41
Setting up rails' localhost:3000 inside a windows 7 virtualbox instance
Set up a new task on startup by following this article:
http://www.techrepublic.com/blog/window-on-windows/make-vista-launch-uac-restricted-programs-at-startup-with-task-scheduler/616
For the command, use:
netsh interface portproxy add v4tov4 listenport=3000 listenaddress=127.0.0.1 connectport=3000 connectaddress=10.0.2.2
@mnutt
mnutt / cluster.js
Created January 11, 2012 19:27
clustering with node 0.6.7
global.config = require('./lib/config').load("config/app.json");
var cluster = require('cluster');
var fs = require('fs');
var app = require('./app');
// Logging
var log = require('./lib/winston');
global.log = log;
// Write out pidfile