Note: This formula is outdated.
To install [Meteor][1] with the [Homebrew][2] formula [below][3], run:
brew install https://raw.github.com/gist/3072321/meteor.rb
This Homebrew Meteor Formula is based on https://install.meteor.com.
# This Ruby script (regardless of where it's located on the file system) recur- | |
# sively lists all duplicate files in the direcotry in which it's executed. | |
require 'digest/md5' | |
hash = {} | |
Dir.glob('**/*', File::FNM_DOTMATCH).each do |f| | |
next if File.directory?(f) | |
key = Digest::MD5.hexdigest(IO.read(f)).to_sym |
require 'rubygems' | |
require 'ruby-debug' | |
require 'gdata' | |
require 'pp' | |
SPREADSHEET_FEED = 'https://spreadsheets.google.com/feeds/spreadsheets/private/full' | |
client = GData::Client::DocList.new | |
email = ARGV[0] |
require 'rubygems' | |
require 'nokogiri' | |
require 'open-uri' | |
module USPS | |
SERVER = "http://production.shippingapis.com/ShippingAPITest.dll" | |
USERNAME = 'username-here' # username from http://www.usps.com/webtools/ | |
class Address | |
# requres ruby-1.9, which keeps hashes ordered |
// Photoshop Script to Resize & Tile Images | |
// | |
// WARNING!!! This script will overwrite (delete perminently) files in the | |
// selected output folder in the rare case that there are name collisions. | |
// Therefore, to be safe, it's best to choose an empty output folder. | |
// | |
// Copyright (c) 2010 Matt Di Pasquale | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal |
// Photoshop Script to Create iPhone Icons from iTunesArtwork | |
// | |
// WARNING!!! In the rare case that there are name collisions, this script will | |
// overwrite (delete perminently) files in the same folder in which the selected | |
// iTunesArtwork file is located. Therefore, to be safe, before running the | |
// script, it's best to make sure the selected iTuensArtwork file is the only | |
// file in its containing folder. | |
// | |
// Copyright (c) 2010 Matt Di Pasquale | |
// |
require 'rspec' | |
class String | |
if method_defined? :reverse_words | |
raise "String#reverse_words is already defined" | |
end | |
def reverse_words | |
split(' ').reverse!.join(' ') | |
end |
@interface NSDecimalNumber (Additions) | |
+ (NSDecimalNumber *)decimalNumberWithString:(NSString *)string scale:(short)scale; | |
- (NSDecimalNumber *)decimalNumberByRoundingByScale:(short)scale; | |
@end |
Note: This formula is outdated.
To install [Meteor][1] with the [Homebrew][2] formula [below][3], run:
brew install https://raw.github.com/gist/3072321/meteor.rb
This Homebrew Meteor Formula is based on https://install.meteor.com.
# How to Install RVM, Ruby, and Gems without Xcode Command Line Tools | |
# =================================================================== | |
# | |
# Mac OS X 10.8.2 (12C60) (Mountain Lion) | |
# Xcode 4.5 (4G182) | |
# | |
# While attempting to `rvm pkg install openssl`, I had encountered the error: | |
# > cryptlib.h:62:20: error: stdlib.h: No such file or directory | |
# But, the commands & ouput below show how I worked around the issue. | |
# |
// http://stackoverflow.com/questions/1801549/reverse-a-singly-linked-list | |
#include <stdio.h> | |
#include <assert.h> | |
typedef struct node Node; | |
struct node { | |
int data; | |
Node *next; | |
}; |