This file contains 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
// 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 |
This file contains 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
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 |
This file contains 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
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] |
This file contains 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 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 |
This file contains 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 | |
class Array | |
def mattflat | |
if empty? # base case | |
self | |
else | |
tail = pop | |
if tail.kind_of? Array | |
mattflat + tail.mattflat |
This file contains 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
" set nocompatible | |
syntax on | |
" set ruler " show [line], [column] of cursor in bottom right of window (hurts performance) | |
" set nu " show line numbers | |
" set columns=80 | |
" filetype plugin indent on " load custom settings based on file type | |
" set spell spelllang=en_us | |
" set softtabstop=2 shiftwidth=2 expandtab | |
" set splitright |
This file contains 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
[user] | |
name = Matt Di Pasquale | |
email = my@fake-email.com | |
[alias] | |
ad = add -A | |
br = branch | |
cr = clone --recursive | |
ci = commit -av | |
cm = commit -am | |
co = checkout |
This file contains 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
# Homebrew, Ruby, Bash Completion | |
# After upgrading Ruby, run: gem pristine --all --only-executables | |
export PATH="/usr/local/bin:/usr/local/opt/ruby/bin:$PATH" | |
if [ -f $(brew --prefix)/etc/bash_completion ]; then | |
. $(brew --prefix)/etc/bash_completion | |
fi | |
# Directory Shortcuts | |
alias prj='cd "$HOME/Projects/"' | |
This file contains 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
<%= view :test_view, :view => 'Admin.TestView', | |
:bind => {:value => 'Admin.masterController.test'} %> |
This file contains 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
// ========================================================================== | |
// Admin.TopicFeatureView | |
// ========================================================================== | |
require('core'); | |
require('views/collection/collection'); | |
require('views/label'); | |
/** @class | |