Skip to content

Instantly share code, notes, and snippets.

View tedkulp's full-sized avatar

Ted Kulp tedkulp

View GitHub Profile
@colinrymer
colinrymer / brews
Last active December 14, 2015 18:39
Get a list of installed homebrew formula with any options used to install them.
#!/usr/bin/env ruby
#
# Colin Rymer - 2013-03-10
require 'json'
Dir.glob('/usr/local/Cellar/**/INSTALL_RECEIPT.json').each do |brew|
name = brew.split('/')[4]
receipt = JSON.load(File.open(brew))
options = receipt['used_options'].join(' ')
puts "#{name} #{options unless options.empty?}"
#!/bin/sh
echo "What should the Application be called (no spaces allowed e.g. GCal)?"
read inputline
name=$inputline
echo "What is the url (e.g. https://www.google.com/calendar/render)?"
read inputline
url=$inputline
@troyk
troyk / contacts.js
Created February 23, 2012 12:38
Mongoose multiple schemas in single collection
// Don't care much about inheritance at this point, but I'll probably attempt it at
// some point via cloning ancestor schema's
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
var Contact = new Schema({
_type: String,
name: String
});