Skip to content

Instantly share code, notes, and snippets.

View tomschlick's full-sized avatar

Tom Schlick tomschlick

View GitHub Profile
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
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
@nodesocket
nodesocket / gist:1536941
Created December 30, 2011 00:37
Supervisord Configuration
[supervisord]
logfile=/var/log/supervisord.log ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=25MB ; (max main logfile bytes b4 rotation;default 50MB)
logfile_backups=5 ; (num of main logfile rotation backups;default 10)
loglevel=info ; (log level;default info; others: debug,warn,trace)
pidfile=/tmp/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
nodaemon=false ; (start in foreground if true;default false)
minfds=1024 ; (min. avail startup file descriptors;default 1024)
minprocs=200 ; (min. avail process descriptors;default 200)
@tcz
tcz / gist:1746180
Created February 5, 2012 15:50
MySQL backup with innobackupex and s3cmd
#!/bin/bash
INNOBACKUP="/root/percona-xtrabackup/innobackupex"
INNOBACKUP_OPTIONS="--defaults-file=/etc/my.cnf --ibbackup=/root/percona-xtrabackup/mysql-5.5/storage/innobase/xtrabackup/xtrabackup_innodb55 --parallel=4 --user=root --password=XXXXXXX"
BACKUPDIR="/var/sqlbackup/"
S3BUCKET="db_backup"
echo "Removing old local backups"
cd $BACKUPDIR
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active June 5, 2024 22:16 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.
@bradmontgomery
bradmontgomery / sshserver.rb
Created October 25, 2012 18:28
Chef role that sets up sshd with an enabled SFTP subsystem. I use `upload_project` in fabric, and after moving to a Chef-based system I started getting `ssh.SSHException: Channel closed` errors.
name "sshserver"
description "Configures SSH and enables SFTP"
run_list(
"recipe[openssl::default]",
"recipe[openssh]",
)
default_attributes(
"openssh" => {
"server" => {
"subsystem" => "sftp /usr/lib/openssh/sftp-server" # path for Ubuntu; ymmv
@philsturgeon
philsturgeon / default.rb
Created January 8, 2013 18:02
Get PHP 5.4 in Ubuntu 12.04 (or just upgrade to 12.10)
# Use PHP 5.4
apt_repository "php54" do
uri "http://ppa.launchpad.net/ondrej/php5/ubuntu"
distribution node['lsb']['codename']
components ["main"]
keyserver "keyserver.ubuntu.com"
key "E5267A6C"
end
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active July 7, 2024 19:32
A badass list of frontend development resources I collected over time.
@RogWilco
RogWilco / kextload.virtualbox.sh
Created June 21, 2013 18:39
Loads the required OS X kernel extensions for VirtualBox. This is specifically useful in the developer preview of OS X 10.9 Mavericks, which for some reason does not seem to automatically load these kernel extensions (which, consequently, will prevent most VMs from successfully booting). Use launchd to have this script run on boot to ensure they…
#!/bin/bash
sudo kextload -r "/Library/Extensions/" "/Library/Extensions/VBoxDrv.kext"
sudo kextload -r "/Library/Extensions/" "/Library/Extensions/VBoxNetFlt.kext"
sudo kextload -r "/Library/Extensions/" "/Library/Extensions/VBoxNetAdp.kext"
sudo kextload -r "/Library/Extensions/" "/Library/Extensions/VBoxUSB.kext"
@joshearl
joshearl / PHP.sublime-settings
Created July 13, 2013 19:44
To enable double-clicking to select PHP variables (including the `$` prefix), save this file as `Data/Packages/User/PHP.sublime-settings`.
{
"word_separators": "./\\()\"'-:,.;<>~!@#%^&*|+=[]{}`~?"
}
@nerrad
nerrad / hipchatcurl.pl
Created February 5, 2014 14:49
Curl string for pinging HipChat server. Event Espresso (one of my clients) is trying out the hipchat.com service and they have a really cool api for sending notifications/messages to the chat rooms. So I wired up our git deploy repo on our server to notify the chatrooms whenever we deploy. Here's the one liner script I added.
curl --data "room_id=99999" --data "from=EEWebsiteBot" --data-urlencode "message=Event Espresso staging servers (beta and dev) have been deployed to" --data "message_format=text" --data "notify=1" --data "color=purple" https://api.hipchat.com/v1/rooms/message?auth_token=obsfucated_api_token
##So the room_id corresponds to what room you want the notifications go to and the auth token is the api key you generate via the group admin in HipChat (web).