Update system packages -- will migrate system forward to CentOS 5.8. (Optional?)
$ sudo yum updateInstall the EPEL Repo:
| import Foundation | |
| import objc | |
| import AppKit | |
| import sys | |
| NSUserNotification = objc.lookUpClass('NSUserNotification') | |
| NSUserNotificationCenter = objc.lookUpClass('NSUserNotificationCenter') | |
| def notify(title, subtitle, info_text, delay=0, sound=False, userInfo={}): | |
| notification = NSUserNotification.alloc().init() |
| #!/usr/bin/env bash | |
| repo=$1 | |
| rm -fr /tmp/gpm \ | |
| && mkdir /tmp/gpm \ | |
| && cd /tmp/gpm \ | |
| && curl -#L https://github.com/$repo/tarball/master \ | |
| | tar zx --strip 1 \ | |
| && make install |
| #!/usr/bin/env python | |
| # http://www.rabbitmq.com/tutorials/tutorial-two-python.html | |
| import pika | |
| import sys | |
| connection = pika.BlockingConnection(pika.ConnectionParameters( | |
| host='localhost')) | |
| channel = connection.channel() | |
| message = ' '.join(sys.argv[1:]) or "Hello World!" |
I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.
If you want to roll up all of these into a single jQuery plugin check out Sharrre
Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.
As configured in my dotfiles.
start new:
tmux
start new with session name:
| # Update, upgrade and install development tools: | |
| apt-get update | |
| apt-get -y upgrade | |
| apt-get -y install build-essential | |
| apt-get -y install git-core | |
| # Install rbenv | |
| git clone git://github.com/sstephenson/rbenv.git /opt/rbenv | |
| # Add rbenv to the path: |
| require 'bundler/capistrano' | |
| $:.unshift(File.expand_path('./lib', ENV['rvm_path'])) # Add RVM's lib directory to the load path. | |
| require "rvm/capistrano" # Load RVM's capistrano plugin. | |
| set :rvm_ruby_string, 'ruby-1.9.2@sinatra-proxy' # Or whatever env you want it to run in. | |
| set :rvm_bin_path, "/usr/local/rvm/bin" | |
| set :application, "railsbp sinatra proxy" | |
| set :repository, "git://github.com/railsbp/sinatra-proxy.git" | |
| set :scm, :git |