Skip to content

Instantly share code, notes, and snippets.

@kennonb
kennonb / gist:2901006
Created June 9, 2012 13:37
Text Editor Font Smoothing (Textmate & Sublime Text 2)
/*
Found this handy little tip here:
http://madeofcode.com/posts/12-snow-leopard-textmate-font-smoothing
*/
/* TextMate */
defaults write com.macromates.textmate AppleFontSmoothing -int 1
/* Sublime Text 2 */
defaults write com.sublimetext.2 AppleFontSmoothing -int 1
@kennonb
kennonb / gist:3488246
Created August 27, 2012 13:02 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@kennonb
kennonb / private.xml
Created January 16, 2013 14:13
KeyRemap4Macbook (private.xml)
<?xml version="1.0"?>
<root>
<item>
<name>F19 to F19</name>
<appendix>(F19 to Hyper (ctrl+shift+cmd+opt) + F19 Only, send escape)</appendix>
<identifier>private.f192f19_escape</identifier>
<autogen>
--KeyOverlaidModifier--
KeyCode::F19,
KeyCode::COMMAND_L,
@kennonb
kennonb / apache2.conf
Created May 30, 2013 20:53
Optimize Debian Web Server based upon RAM
# Based upon 512 MB RAM
<IfModule mpm_prefork_module>
StartServers 1
MinSpareServers 3
MaxSpareServers 6
MaxClients 24
MaxRequestsPerChild 3000
</IfModule>
@kennonb
kennonb / scp-id_rsa.pub-to-remote.sh
Created May 30, 2013 20:54
Secure Copy Public Key to Remote Location
scp ~/.ssh/id_rsa.pub squire@example.com:/home/user/.ssh/uploaded_key.pub
ssh squire@example.com "echo `cat ~/.ssh/uploaded_key.pub` >> ~/.ssh/authorized_keys"
@kennonb
kennonb / generate_ssl_csr
Created June 20, 2013 15:12
OpenSSL CSR (Apache)
openssl req -nodes -newkey rsa:2048 -keyout myserver.key -out server.csr
@kennonb
kennonb / os-x-defaults-new-install
Created June 27, 2013 21:09
OS X Defaults (New Install)
# No delay on Dock display.
defaults write com.apple.Dock autohide-delay -float 0
# Expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
# Expand print panel by default
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
# Disable the “Are you sure you want to open this application?” dialog
@kennonb
kennonb / change_bind_address.sh
Created February 7, 2014 22:54
Allow external access to MySQL from Vagrant
# sudo nano /etc/mysql/my.cnf change:
bind-address = 0.0.0.0
@kennonb
kennonb / mdutil_indexing
Created June 10, 2014 16:04
Enable/Disable Spotlight Index
mdutil -i on <Volume Path>
@kennonb
kennonb / symlink_sites_home_folder
Created June 10, 2014 16:06
Symlink ~/Sites to another Volume