Public Gists by jmazzi

Gravatar
Mon Aug 31 07:32:19 -0700 2009
1
2
3
#!/usr/bin/env ruby
puts "looking for the gems to upgrade..."
gem_info = Struct.new(:name, :version)
Gravatar
Wed Aug 12 13:25:58 -0700 2009
1
2
3
class CallLog < ActiveRecord::Base
  def self.connect_db(extension)
    # validate extension
Gravatar
Wed Jul 29 12:53:36 -0700 2009
1
2
3
#compdef git git-add git-am git-annotate git-apply git-applymbox git-applypatch git-archimport git-archive git-bisect git-blame git-branch git-cat-file git-check-attr git-check-ref-format git-checkout git-checkout-index git-cherry git-cherry-pick git-clean git-clone git-clone-pack git-commit git-commit-tree git-convert-objects git-count-objects git-cvsexportcommit git-cvsimport git-cvsserver git-daemon git-describe git-diff git-diff-files git-diff-index git-diff-stages git-diff-tree git-fast-import git-fetch git-fetch-pack git-fmt-merge-msg git-for-each-ref git-format-patch git-fsck git-gc git-get-tar-commit-id git-grep git-hash-object git-http-fetch git-http-push git-imap-send git-index-pack git-init git-instaweb git-local-fetch git-log git-lost-found git-ls-files git-ls-remote git-ls-tree git-mailinfo git-mailsplit git-merge git-merge-base git-merge-file git-merge-index git-merge-one-file git-merge-tree git-mergetool git-mktag git-mktree git-mv git-name-rev git-pack-objects git-pack-redundant git-pack-refs git-patch-id git-peek-remote git-prune git-prune-packed git-pull git-push git-quiltimport git-read-tree git-rebase git-receive-pack git-reflog git-relink git-remote git-repack gut-runstatus git-config git-request-pull git-rerere git-reset git-rev-list git-rev-parse git-revert git-rm git-send-email git-send-pack git-sh-setup git-shell git-shortlog git-show git-show-branch git-show-index git-show-ref git-ssh-fetch git-ssh-upload git-status git-stripspace git-svn git-svnimport git-symbolic-ref git-tag git-tar-tree git-unpack-file git-unpack-objects git-update-index git-update-ref git-update-server-info git-upload-archive git-upload-pack git-var git-verify-pack git-verify-tag git-whatchanged git-write-tree
 
_git() {
Gravatar
Wed Jul 29 10:57:40 -0700 2009
1
2
3
(* Check if iTunes is running and grab current song / artist / album *)
tell application "System Events"
if exists process "iTunes" then
gist: 149118 a command line prompt with ...
Gravatar
Fri Jul 17 08:46:31 -0700 2009
1
2
3
# :PUBLISHER: markdown, shell, { command: 'rdiscount' }
# :BRACKET_CODE: '[ruby]', '[/ruby]'
# :TEXT:
Gravatar
Wed Jul 08 11:52:08 -0700 2009
1
2
3
# $ tweet Hi mom!
#
# Put this in ~/.bashrc or wherever.
Gravatar
Wed Jul 08 08:00:19 -0700 2009
1
2
3
#
# bash completion support for core Git.
#
Gravatar
Thu Jul 02 11:16:42 -0700 2009
1
2
3
<?php
 
declare(ticks = 1);
Gravatar
Sat Jun 27 17:57:40 -0700 2009
1
2
3
The form/controller works fine in development, and doesn't in production. It DID work fine in production earlier this week, but now it doesn't, and I didn't make any changes to the code. Any ideas, please send to garyz@easysoftsolutions.com.
 
Controller
Gravatar
Wed Jun 17 10:09:24 -0700 2009
1
while(true); do curl -s -L http://phobos.apple.com/version | grep -i restore | grep '_3.' | perl -p -e 's/<string>http:\/\/.*\/(.*)<\/string>/$1/g' | perl -p -e 's/\s+/\n/g' | grep -v iPhone2,1_3.0_7A341_Restore; sleep 10; done
Gravatar
Tue May 26 07:23:04 -0700 2009
1
sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-include=/opt/local/include/mysql5 --with-mysql-lib=/opt/local/lib/mysql5 --with-mysql-config=/opt/local/lib/mysql5/bin/mysql_config
Gravatar
Thu Apr 23 10:27:27 -0700 2009
1
2
3
class Foo < ActiveRecord::Base
  # attrs: bar (integer), baz (integer)
 
Gravatar
Wed Apr 15 08:49:41 -0700 2009
1
2
3
#
# rails template for skeleton app, haml, sass, shoulda, factory_girl, jquery
#
Gravatar
Wed Mar 25 16:54:21 -0700 2009
1
2
3
@valid_messages = [
  'Viatalk helps me connect with my friends and family!',
  'I love Viatalk Phone Service!',
Gravatar
Tue Mar 24 12:27:51 -0700 2009
1
2
3
  # Original, did not work in production
  map.connect 'referrals/logout', :controller => 'referrals/login', :action => 'logout'
  map.connect 'referrals/:action/:id', :controller => 'referrals/home'
Gravatar
Wed Feb 04 08:45:41 -0800 2009
1
2
3
# Generates a series of substitution cipher puzzles. The messages to
# "encrypt" are take from a text file passed on the command-line,
# where each message is on one line.
Gravatar
Sat Jan 31 16:40:19 -0800 2009
1
2
3
# http://henrik.nyh.se/2008/12/git-dirty-prompt
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/
# username@Machine ~/dev/dir[master]$ # clean working directory
Gravatar
Fri Jan 30 06:02:21 -0800 2009
1
2
3
# http://henrik.nyh.se/2008/12/git-dirty-prompt
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/
# username@Machine ~/dev/dir[master]$ # clean working directory