Skip to content

Instantly share code, notes, and snippets.

View mattjmorrison's full-sized avatar

Matthew J Morrison mattjmorrison

View GitHub Profile
@mattjmorrison
mattjmorrison / .zshrc
Created November 30, 2013 14:27
.zshrc
#!/bin/zsh
# vim: set foldmarker=<<,>> foldlevel=1 foldmethod=marker:
#===================================================================================
# .__
# ________ _____| |_________ ____
# \___ / / ___/ | \_ __ \_/ ___\
# / / \___ \| Y \ | \/\ \___
# /_____ \/____ >___| /__| \___ >
# \/ \/ \/ \/
#===================================================================================
echo "Loading Aliases"
alias ls='ls -FHG'
alias ll='ls -lh'
alias la='ls -la'
alias l='ls'
alias lls='ll -Sr'
alias less='less -imJMW'
alias update='brew update && brew upgrade'
alias upgrade='brew upgrade'
alias clean='brew doctor'
@mattjmorrison
mattjmorrison / aliases.plugin.zsh
Last active December 29, 2015 15:39
IMT zsh aliases
echo "Loading Aliases"
alias ls='ls -FHG'
alias ll='ls -lh'
alias la='ls -la'
alias l='ls'
alias lls='ll -Sr'
alias less='less -imJMW'
alias update='brew update && brew upgrade'
alias upgrade='brew upgrade'
alias clean='brew doctor'
@mattjmorrison
mattjmorrison / emacs-bindings.plugin.zsh
Last active December 29, 2015 15:39
zsh emacs key bindings
echo "Loading Emacs Bindings"
bindkey '^b' backward-word
bindkey '^f' forward-word
bindkey '^R' history-incremental-search-backward
bindkey '^R' history-incremental-pattern-search-backward
bindkey '^?' backward-delete-char
bindkey '^H' backward-delete-char
autoload -U colors && colors
autoload -U promptinit
autoload -Uz vcs_info
local reset white gray green red yellow blue cyan magenta black
reset="%{${reset_color}%}"
white="%{$fg[white]%}"
gray="%{$fg_bold[black]%}"
green="%{$fg_bold[green]%}"
red="%{$fg[red]%}"
diskutil list
diskutil unmountDisk /dev/diskN
sudo dd if=/path/to/iso of=/dev/diskN bs=1m
diskutil eject /dev/diskN
@mattjmorrison
mattjmorrison / refactor.coffee
Created April 25, 2013 20:59
Nice CoffeeScript refactor....
#Before
canModify: Ember.computed ->
value = false
description = @get('content.statusDescription')
if description is 'Unsent' or description is 'Do Not Send'
value = true
value
#After
>>> import pynotify
>>> pynotify.init("Test")
True
>>> pynotify.Notification("T", "B", "dialog-warning").show()
True
>>> pynotify.Notification("T", "B", "dialog-info").show()
True
>>> pynotify.Notification("T", "B", "dialog-error").show()
True
@mattjmorrison
mattjmorrison / notes.txt
Last active December 13, 2015 23:19
Ubuntu Setup Notes
install zsh
sudo apt-get -y install emacs23-nox zsh
wget --no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh
chsh -s $(which zsh)
.dotfiles repo
-> .emacs.d submodule
// Instead of
Someframework.object.create({
my: 'attributes',
go: 'here'
});
// Try doing this
function MyObject(){
this.my = "attributes";
this.go = "here";