Skip to content

Instantly share code, notes, and snippets.

View orta's full-sized avatar
🥂

Orta Therox orta

🥂
View GitHub Profile
<?php
/*
Plugin Name: AdMangler for bbPress
Plugin URI: http://www.webternals.com/products/admangler/
Description: Display ad space on your bbpress powered site with AdMangler.
Version: 0.1
Author: Webternals, LLC - Allen Sanford
Author URI: http://www.webternals.com/
*/
#import <Cocoa/Cocoa.h>
@interface RosterController : NSObject
{
BOOL useSSL;
IBOutlet id window;
}
@orta
orta / Git-Achievements in Basecamp
Created April 27, 2010 17:03
Git Achievements
# Add this to line 86 on git-achievements
# ruby basecamp.rb "`git config user.name`" "$@" "$2"
# then create a file called basecamp.rb with the rest of this file in it
#!/usr/bin/env ruby
require 'rubygems' rescue nil
require 'broach'
#keep a good history for using ctrl + r
export HISTCONTROL=erasedups
export HISTSIZE=10000
shopt -s histappend
#colours and vars
export EDITOR='mate -w'
export LSCOLORS=ExFxCxDxBxegedabagacad
alias mysql=/usr/local/mysql/bin/mysql
function gitac {
if [ "$2" ]
then
git add src/
git commit -m "$1 [#$2 state:resolved]"
else
git add src/
git commit -m "$1"
fi
}
function include (lib){
document.write(unescape('%3Cscript src="javascripts/' + lib +'.js?v=' + Math.floor(Math.random()*20000)
+ '"%3E%3C/script%3E'));
}
// ==UserScript==
// @name Hoptoad Textmate Backtrace
// @namespace hoptoad
// @description Add textmate links to application stacktrace lines on error pages
// @include https://YOURACCOUNT.hoptoadapp.com/errors/*
// ==/UserScript==
//
// based on original script from http://userscripts.org/scripts/show/63465
// with much help from @orta
class AddAuthorToWoofs < ActiveRecord::Migration
def self.up
add_column :woofs, :author_id, :integer
end
def self.down
remove_column :woofs, :author_id, :integer
end
end
resource :admin do
member do
get "toggle_admin"
get "toggle_videocast"
end
end
From ZSH
macgem install aws-s3
Successfully installed aws-s3-0.6.2
1 gem installed
macirb
irb(main):001:0> require 'json'
=> true
irb(main):002:0> require 'aws/s3'