Skip to content

Instantly share code, notes, and snippets.

# open C:\Users\michael.patterson\AppData\Local\slack

# go to the current version directory

# go to app.asar.unpacked/src/static

# add the following to ssb-interop.js:

document.addEventListener('DOMContentLoaded', function() { $.ajax({

@mppatterson
mppatterson / gist:56662799846addcc028a
Created February 16, 2015 16:35
Enable key repeat for phpstorm and rubymine
# This was noted, but did not seem to work
# defaults write -g ApplePressAndHoldEnabled -bool false
# This one seemed to work, and is supposed to be specific to phpstorm and rubymine
defaults write com.jetbrains.intellij.ce ApplePressAndHoldEnabled -bool false
@mppatterson
mppatterson / php.ini
Created November 13, 2014 22:16
mailcatcher php.ini config with mailcatcher installed via rvm
SMTP = 0.0.0.0
smtp_port = 1025
sendmail_from = yourname@localhost
; Find catchmail path with "which catchmail"
sendmail_path = /usr/local/rvm/wrappers/ruby-1.9.3-p392@global/catchmail --ip 0.0.0.0 -f yourname@localhost
; Then run mailcatcher with:
; mailcatcher --ip=0.0.0.0
@mppatterson
mppatterson / alias
Created October 10, 2014 21:17
Git alias with autocomplete
# Alias 'g' to 'git' and provide autocomplete functionality.
alias g='git'
complete -o bashdefault -o default -o nospace -F _git g 2>/dev/null || complete -o default -o nospace -F _git g
@mppatterson
mppatterson / install.sh
Created October 10, 2014 01:20
Install Ruby MySQL Gem Requirements on Ubuntu
#! /bin/bash
apt-get install mysql-server libmysql-ruby libmysqlclient-dev
@mppatterson
mppatterson / install.sh
Created October 10, 2014 01:18
Install Kohana Requirements
# Install Kohana Requirements
sudo apt-get install php-pear
sudo apt-get install php5-dev libcurl3-openssl-dev
sudo pecl install pecl_http
sudo apt-get install php5-mcrypt
echo "==================="
echo "Manual instructions"
@mppatterson
mppatterson / .gitconfig
Last active August 29, 2015 14:04
Git Aliaes
# From: http://durdn.com/blog/2012/11/22/must-have-git-aliases-advanced-examples/
# color {{{
[color]
branch = auto
diff = auto
status = auto
[color "branch"]
current = red reverse
@mppatterson
mppatterson / gist:186cba857fa63f55f96b
Last active August 29, 2015 14:04
Set clock to CST on Ubuntu
# Painful enough on multiple occasions to keep on file!
sudo rm /etc/localtime
sudo ln -s /usr/share/zoneinfo/US/Eastern /etc/localtime
@mppatterson
mppatterson / bash_aliases
Last active August 29, 2015 14:03
All of the bash aliases I use on a regular basis
function rails(){
bundle exec spring rails "$@"
}
function rake(){
bundle exec spring rake "$@"
}
function rspec(){
bundle exec spring rspec "$@"
@mppatterson
mppatterson / gist:9983408
Created April 4, 2014 21:22
Install phantomjs on linux
mkdir phantomjs
cd phantomjs
wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2
bunzip2 phantomjs-1.9.7-linux-x86_64.tar.bz2
tar -xf phantomjs-1.9.7-linux-x86_64.tar
mv phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/local/bin/
sudo mv phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/local/bin/