Skip to content

Instantly share code, notes, and snippets.

@filipechagas
filipechagas / gist:3372576
Created August 16, 2012 18:46
Mac OSX Lion (Mountain Lion) Reactivating key repetition
defaults write -g ApplePressAndHoldEnabled -bool false
@filipechagas
filipechagas / gist:3373527
Created August 16, 2012 20:46
Global git ignore file
git config --global core.excludesfile ~/.gitignore_global
@filipechagas
filipechagas / gist:3440699
Created August 23, 2012 19:38
My ackrc file - To search on erb, haml, less, sass, etc.
→ cat ~/.ackrc
--type-add
html=.html.erb,.html.haml,.haml
--type-add
css=.sass,.less,.scss
@filipechagas
filipechagas / gist:3502030
Created August 28, 2012 18:44
Mac OSX - Xcode Select Switch
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
@filipechagas
filipechagas / gist:3503583
Created August 28, 2012 20:10
Update DB on OSX
ln -s /usr/libexec/locate.updatedb /usr/local/bin/updatedb
@filipechagas
filipechagas / gist:3512235
Created August 29, 2012 13:09
Git configuration tips
source: http://www.arthurkoziel.com/2008/05/02/git-configuration/
Git Configuration
Published 2nd May 2008
Here are some useful configuration options for Git. Some of them, like the Bash completion, are OS X specific but should also work if you adjust the paths according to your system of choice.
Install with MacPorts:
@filipechagas
filipechagas / gist:3643242
Created September 5, 2012 19:38
Custom bash completion example
_xm()
{
local cur prev opts base
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
#
# The basic options we'll complete.
#
@filipechagas
filipechagas / gist:3699479
Created September 11, 2012 15:04
Change root password - mysql (installed via home brew)
$(brew --prefix mysql)/bin/mysqladmin -u root password NEWPASS
@filipechagas
filipechagas / gist:3724809
Last active October 9, 2020 14:10
Sudo without password
sudo visudo
user-name ALL=NOPASSWD: ALL
#or
%group ALL=NOPASSWD: ALL
@filipechagas
filipechagas / gist:3796109
Created September 27, 2012 19:54
Ctags on Mac Osx

http://gmarik.info/blog/2010/10/08/ctags-on-OSX

Snow Leo ships with ctags not suitable for Ruby development. Ie if you try to generate tags recursively, it will error out:

$ ctags R
ctags: illegal option -
R
usage: ctags [-BFadtuwvx] [-f tagsfile] file …

$ which ctags
/usr/bin/ctags