Skip to content

Instantly share code, notes, and snippets.

View mwesten's full-sized avatar

Max Westen mwesten

View GitHub Profile

“A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.”

I think it's from “The moon is a harsh mistress”

@mwesten
mwesten / migrate.rb
Created January 11, 2012 18:11 — forked from cyfdecyf/migrate.rb
Migrate from wordpress to octopress
# coding: utf-8
require 'rubygems'
require 'hpricot'
require 'fileutils'
require 'time'
require 'ya2yaml'
require 'nokogiri'
require 'cgi'
@mwesten
mwesten / migrate.rb
Created January 11, 2012 18:38 — forked from zellux/migrate.rb
Migrate from wordpress to octopress
# coding: utf-8
require 'rubygems'
require 'hpricot'
require 'fileutils'
require 'time'
require 'ya2yaml'
require File.join(File.dirname(__FILE__), "downmark_it")
require 'nokogiri'
require 'cgi'
@mwesten
mwesten / newpost.rb
Created January 11, 2012 22:39 — forked from zanshin/newpost.rb
Create and Isolate a new Posting for Octopress
#!/usr/bin/env ruby
#
# newpost.rb new-post-title
#
# Author: Mark Nichols, 8/2011
#
# This script automates the process of creating a new Octopress posting.
# 1. The Octopress rake new_post task is called passing in the posting name
# 2. The Octopress rake isolate taks is called to sequester all other postings in the _stash
# 3. The new file is opened in TextMate
@mwesten
mwesten / Code added to _config.yml
Created January 11, 2012 23:48 — forked from lucifr/Code added to _config.yml
Flickr aside for Octopress
# Flick Badges
# Find your user id here: http://idgettr.com/ It should be something like "25711589%40N00".
flickr_user: 25711589%40N00
flickr_count: 6
@mwesten
mwesten / auth.php
Created February 23, 2012 13:09
Laravel 3 Auth Controller
<?php
class Auth_Controller extends Base_Controller {
public $restful = true;
public function __construct() {
$this->filter( 'before', 'guest' )->except( array( 'logout', 'validate' ) );
// Note: We may not always require CSRF on login for system based logins so ignore it here.
$this->filter( 'before', 'csrf' )->on( 'post' )->except( array( 'login' ) );
}
@mwesten
mwesten / _IDE_HELPER.php
Created February 23, 2012 19:14 — forked from mikelbring/_IDE_HELPER.php
Laravel IDE Helper
<?php
class Auth extends System\Auth { }
class Benchmark extends System\Benchmark { }
class Cache extends System\Cache { }
class Config extends System\Config { }
class Cookie extends System\Cookie { }
class Crypt extends System\Crypt { }
class DB extends System\DB { }
class Error extends System\Error { }
@mwesten
mwesten / hack.sh
Created April 2, 2012 06:44 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@mwesten
mwesten / .gitconfig
Created June 16, 2012 12:15 — forked from sanguis/.gitconfig
my .gitconfig file minus my name and email
[color]
ui = on
[core]
whitespace= fix,-indent-with-non-tab,-indent-with-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[alias]
df = !git diff --no-prefix && git diff --staged --no-prefix
clear = reset --hard
st = status
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative

These are some notes I put together prior to and during setting up my new Retina MacBook Pro. If anyone else is setting up a new machine, it may help you with the process.

Prepare Old Machine

  • Verify Disk with Disk Utility—see here
  • Generate a final TimeMachine backup
  • Verify Crashplan backup is complete
  • Create a final SuperDuper! bootable backup
  • Push changes to remote git repos