Skip to content

Instantly share code, notes, and snippets.

View jpemberthy's full-sized avatar

Juan Pemberthy jpemberthy

View GitHub Profile
cat .gemrc
gem: --no-ri --no-rdoc
Executing convert command: #<MiniMagick::CommandBuilder:0x007f8d33387cb0 @tool="mogrify", @args=["-resize", "500\\>", "-coalesce"
function staging_deploy {
current_branch=`git branch | grep \* | awk '{print $2}'`
if [ $# -gt 0 ]; then # we have args
staging=$1
else
staging="staging"
fi
bundle exec cap -s branch=$current_branch $staging deploy
require 'rubygems' rescue nil
if defined? Bundler
Gem.post_reset_hooks.reject! { |hook| hook.source_location.first =~ %r{/bundler/} }
Gem::Specification.reset
load 'rubygems/custom_require.rb'
end
if defined? Rails
begin
require 'rubygems' rescue nil
require 'wirble'
require 'hirb'
Wirble.init
Wirble.colorize
Hirb::View.enable
railsrc_path = File.expand_path('~/.railsrc')
if ( ENV['RAILS_ENV'] || defined? Rails ) && File.exist?( railsrc_path )
begin
function gp {
current_branch=`git branch | grep \* | awk '{print $2}'`
git push origin $current_branch
}
function pull {
current_branch=`git branch | grep \* | awk '{print $2}'`
git pull origin $current_branch
}
>> s3 = AWS::S3.new.buckets[UPLOADER_BUCKET].objects['images/1/large.jpg']
=> AWS::S3::S3Object:whi-dev-transientimages1largejpg
>> s3.copy_to('images/1/fake_large.jpg', { :acl =>:public_read })
=> AWS::S3::S3Object:whi-dev-transientimages1fake_largejpg
http://local.weheartit.com:3000/create_entry?title=Tumblr&via=http://www.tumblr.com/popular&media=http://www.bettingexpert.com/assets/snippets/webloginpe/userimages/1351501656_20403.jpg
58561766 1 image/jpeg tumblr_mk0eyzZKEP1rju03mo1_500.jpg
58561767 1 image/jpeg tumblr_ml9vc5d5dM1rox1lho1_500.jpg
58561768 1 image/jpeg tumblr_lrj9l9ig2X1qgdpaao1_400.jpg
58561769 1 image/png tumblr_ml3p3vFxJc1qiviv2o1_500.png
58561770 1 image/jpeg 150448_341526982634846_1887662883_n.jpg
58561771 1 image/jpeg 4481b6f2a56611e2bbed22000a9e28b0_7.jpg
58561772 1 image/jpeg 534135_10200961492229618_107591242_n.jpg
58561773 1 image/jpeg y.jpg
58561774 1 image/jpeg 47868_alyssa_miller1_123_80lo.jpg
58561775 1 image/jpeg tumblr_le9cxvOMG51qcpn3co1_500_large.jpg
Events:
anything containing <tony|scarface|montana> - Displays a Tony's quote.
debug - {user: <user object to send message to>}
heartbot <keyword> tweet - Returns a link to a tweet about <keyword>
heartbot <user> is a badass guitarist - assign a role to a user
heartbot <user> is not a badass guitarist - remove a role from a user
heartbot animate me <query> - The same thing as `image me`, except adds a few parameters to try to return an animated GIF instead.
heartbot convert me <expression> to <units> - Convert expression to given units.
heartbot die - End heartbot process