- create a new pool by first creating an empty partition space using
diskutil
orDisk Utility
zpool status -v
#!/usr/bin/env ruby | |
# Execute the git, gem, or rake command, depending on the second argument | |
case ARGV.first | |
when /^(add|bisect|branch|checkout|clone|commit|diff|fetch|grep|init|log|merge|mv|pull|push|rebase|reset|rm|show|status|tag)$/ | |
system "git #{ARGV.join(' ')}" | |
when /^(build|cert|check|cleanup|contents|dependency|environment|fetch|generate_index|help|install|list|lock|mirror|outdated|pristine|query|rdoc|search|server|sources|specification|stale|uninstall|unpack|update|which)$/ | |
system "gem #{ARGV.join(' ')}" | |
else |
env_vars = "RAILS_ENV=production PATH=/sb/thehierarchy/ruby/bin:/sb/thehierarchye/nginx/sbin:$PATH RUBY_HEAP_MIN_SLOTS=500000 RUBY_HEAP_SLOTS_INCREMENT=250000 RUBY_HEAP_SLOTS_GROWTH_FACTOR=1 RUBY_GC_MALLOC_LIMIT=50000000" | |
RAILS_ROOT = "/var/www/apps/thehierarchy/current/" | |
Bluepill.application("thehierarchy") do |app| | |
app.process("scheduled_notifications") do |process| | |
process.group = "thehierarchy" | |
process.pid_file = File.join(RAILS_ROOT, "tmp", "pids", "scheduled_notifications") | |
process.daemonize = true | |
process.start_command = "/usr/bin/env #{env_vars} rake --rakefile=#{RAILS_ROOT}/Rakefile app_name:scheduled_notifications" | |
require 'growl' | |
module Jekyll | |
class GrowlGenerator < Generator | |
safe false | |
def generate(site) | |
Growl.notify 'Building...', :title => 'Jekyll' | |
end | |
end |
#!/bin/sh | |
# install into /etc/ppp/ip-down | |
# chmod a+x /etc/ppp/ip-down | |
source /etc/ppp/ip.config | |
case "${IPREMOTE}" in | |
${MY_IPREMOTE}) | |
/sbin/route delete ${MY_ROUTE} -interface ${IFNAME} |
I just replaced the hard drive of my mbp and decided to do a clean install of Mountain Lion (10.8.5) since I was still using Snow Leopard (10.6.8).
I kinda regret for not using Boxen to automate the process, but TBH I have this laptop for almost 3yrs and this is the first time I needed to reinstall everything, maybe the next time...
#!/usr/bin/env python | |
# | |
# Copyright 2011, Jason Graham | |
# | |
# Uses python-markdown to convert a markdown document to the body | |
# of an HTML document to display with cgit (http://hjemli.net/git/cgit/). | |
# | |
# Install: | |
# | |
# 1- Install python-markdown ( sudo apt-get install python-markdown ) |
gem 'kaminari' # Pagination |
require "active_record" | |
ActiveRecord::Base.establish_connection('postgres:///testing') | |
ActiveRecord::Migration.verbose = false | |
ActiveRecord::Migration.class_eval do | |
create_table :played_quizzes, force: true do |t| | |
t.integer :player_ids, array: true | |
t.json :quiz_snapshot | |
end |
module AuthHelper | |
def http_login | |
user = 'username' | |
pw = 'password' | |
request.env['HTTP_AUTHORIZATION'] = ActionController::HttpAuthentication::Basic.encode_credentials(user,pw) | |
end | |
end | |
module AuthRequestHelper | |
# |