Skip to content

Instantly share code, notes, and snippets.

Michael Nutt mnutt

Block or report user

Report or block mnutt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:11026936
Index: tgz2dmg.sh
===================================================================
--- tgz2dmg.sh (revision 264)
+++ tgz2dmg.sh (working copy)
@@ -115,8 +115,12 @@
elif [[ "$next" = "rsrc" ]]; then
cp "$1" "$TMPDIR/resources"
elif [[ "$next" = "rsrcdir" ]]; then
- [[ -f "$1" ]] && cp "$1" "$TMPDIR/resources"
- [[ -d "$1" ]] && cp -R "$1" "$TMPDIR/resources"
View ember-select2.coffee
TaggedInputComponent = ValidatingInputComponent.extend
didInsertElement: ->
Em.run.schedule "afterRender", @, ->
tags = (@get("value") || "").split(",")
@$('input').select2
tags: tags
tokenSeparators: [","]
maximumSelectionSize: 3
selectOnBlur: true
width: "resolve"
View gist:46774a8073b65913700c
use unix zoneinfo files
features:
* list all of the currently applicable timezones (excluding ones that are DST when they're not currently in DST)
* convert times between your timezone, UTC, and other available timezones
View keybase.md

Keybase proof

I hereby claim:

  • I am mnutt on github.
  • I am mnutt (https://keybase.io/mnutt) on keybase.
  • I have a public key whose fingerprint is AEB2 CD41 DA20 9610 BF3F 6A4C 6B66 44DA 9001 BF6B

To claim this, I am signing this object:

View gist:4219
def search(*args)
params = {:id => content_ids}
if Hash === args.last
if args.last[:conditions]
args.last[:conditions].merge!(params)
else
args.last[:conditions] = params
end
else
args << {:conditions => params}
View launcher.sh
#!/bin/bash
# By default, this script does nothing. You'll have to modify it as
# appropriate for your application.
cd /opt/app
echo "LAUNCHER STARTING"
PORT=8000 node app.js
View test.rb
def hello
puts "this is a test"
end
View code_kata_4.rb
#!/usr/bin/env ruby
# Kata #4: Football Data
def smallest_spread(file)
weather_data = File.open(file).readlines
temp_spread = weather_data.map {|line|
next unless line.match(/\s([A-Za-z_]+).*?(\d+)\s\s-\s\s(\d+)/)
day, max, min = $1, $2.to_i, $3.to_i
View bridge features.txt
== Bridge Features ==
System
* shutdown() - shutdown limewire
-- org.limewire.core.api.Application::stopCore()
* restart() - restart limewire
-- org.limewire.core.api.Application::startCore() ?
* setOption() - change a configuration option
-- #TODO
* getOption() - retrieve a configuration option
You can’t perform that action at this time.