Skip to content

Instantly share code, notes, and snippets.

View mcallari's full-sized avatar

Michael Callari mcallari

View GitHub Profile
// Disable Chrom Swipe http://apple.stackexchange.com/questions/21236/how-do-i-disable-chromes-two-finger-back-forward-navigation
defaults write com.google.Chrome AppleEnableSwipeNavigateWithScrolls -bool FALSE
@mcallari
mcallari / find text in files linux
Created July 7, 2015 19:44
Find text in files on Linux
grep -rnw 'dir' -e 'string'
@mcallari
mcallari / gist:f080aaffa045c5f2fa43
Created July 6, 2015 15:47
Yosemite Kill Camera
sudo killall AppleCameraAssistant
@mcallari
mcallari / ansible provision
Created May 5, 2015 15:02
Provision an ansible playbook to run on a vagrant
ansible-playbook --private-key=/Users/mcallari/Projects/xx/xx/.vagrant/machines/portal/virtualbox/private_key --user=vagrant --connection=ssh --limit='portal' --inventory-file=/Users/xxx/.vagrant/provisioners/ansible/inventory --extra-vars={"ip_address":"172.22.22.99","project_name":"project","project_root":"/var/www/root/","project_docroot":"/var/www/docroot"} provisioning/site.yml
@mcallari
mcallari / get external ip
Created April 27, 2015 15:49
Get the external IP address of a server
http://unix.stackexchange.com/questions/22615/how-can-i-get-my-external-ip-address-in-bash
dig +short myip.opendns.com @resolver1.opendns.com
vagrant@guardian-portal:/var/www/guardian-portal/docroot/sites/all/themes/contrib$ yo aurora
events.js:85
throw er; // Unhandled 'error' event
^
Error: Cannot find module './build/Release/shell'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/home/vagrant/.ndenv/versions/v0.12.0/lib/node_modules/generator-drupal-theme/node_modules/execSync/index.js:30:11)
@mcallari
mcallari / git-archive
Created February 2, 2015 19:31
GIT Archive
git archive [branch] | gzip > [path/filename].tar.gz
@mcallari
mcallari / acquia-varnish-purge
Created August 22, 2014 15:13
Purge a path from Acquia Cloud Varnish cache
curl -X PURGE -H "X-Acquia-Purge:[site.com]" -H "Accept-Encoding: gzip" http://url
@mcallari
mcallari / restart-virtualbox-osx
Created August 21, 2014 18:53
Restart VirtualBox on OSX
If you need to restart VirtualBox.
This fixes an issue such as:
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["hostonlyif", "create"]
sudo /Library/Application\ Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh restart
@mcallari
mcallari / osx-hidden-files-aiases
Created June 24, 2014 18:22
Show and hide hidden files on OSX aliases
alias showfiles='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app'
alias hidefiles='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app'