#Examples
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
#! /usr/bin/pythonw | |
# | |
# Modified by Michael Bianco <[email protected]> on June 26, 2009 | |
# Written by Thomas Pan at January 21, 2007 | |
# mysql2graffle for Omnigraffle 5 is based on | |
# MyDBGraffle for OmniGraffle 4 which is based on Paul Davis' work at http://www.visualdistortion.org | |
# | |
# Requires: | |
# | |
# OmniGraffle 5 |
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
#!/usr/bin/env ruby | |
# rubycocoa | |
require 'osx/cocoa' | |
include OSX | |
OSX.require_framework 'ScriptingBridge' | |
class GraffleConverter | |
def initialize | |
@graffle = SBApplication.applicationWithBundleIdentifier_("com.omnigroup.OmniGraffle") |
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
// | |
// NSString+Levenshtein.h | |
// PyHelp | |
// | |
// Modified by Michael Bianco on 12/2/11. | |
// <http://mabblog.com> | |
// | |
// Created by Rick Bourner on Sat Aug 09 2003. | |
// [email protected] |
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 <Cocoa/Cocoa.h> | |
@interface CPSystemInformation : NSObject {} | |
//all the info at once! | |
+ (NSDictionary *)miniSystemProfile; | |
+ (NSString *)machineType; | |
+ (NSString *)humanMachineType; | |
+ (NSString *)humanMachineTypeAlternate; |
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
# this assumes you have a default directory defined | |
find /tftpboot/logs/ | ack 'logs/([^-]+)' --output '$1' | sed '/^$/d' | while read mac | |
do | |
cp -f "000000000000-directory.xml" "$mac-directory.xml" | |
done |
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
#!/usr/bin/env python | |
# http://pastebin.com/nwanNPHs | |
import os, sys | |
from AppKit import NSMutableDictionary | |
appPath = sys.argv[1] | |
projectPlist = NSMutableDictionary.dictionaryWithContentsOfFile_(os.path.join(appPath, 'Contents/Info.plist')) | |
print projectPlist['CFBundleVersion'].strip(), |
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 google_map_directions(address) | |
if address.class != String | |
address = [:address, :address2, :city, :state, :zipcode, :country].map { | |
|a| (address.respond_to? a) ? address.send(a) : "" | |
}.join " " | |
end | |
q = Rack::Utils::build_query({ | |
:f => "q", | |
:hl => "en", |
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
# for now, all USPS shipments cannot exceed 70 lbs | |
# this is also a bit sneaky b/c it relies on a particular load order | |
# should require_dependency or something | |
# http://www.uship.com/freight/articles/parcel-weight-restrictions/ | |
# Spree::ShippingMethod.all.map(&:calculator).select { |m| m.class.to_s.start_with? 'Spree::Calculator::Usps' }.each do |calculator| | |
[ |
First install the required gems:
gem install octokit awesomeprint rainbow
Then run it to extract all of your open GitHub issues into files (with comments).
ruby my-gh-issues.rb