Skip to content

Instantly share code, notes, and snippets.

View reinier's full-sized avatar
🔭
remote

Reinier Ladan reinier

🔭
remote
View GitHub Profile
@reinier
reinier / post2linkpost.php
Created January 10, 2013 18:57
If the incoming post through xml-rpc contains a custom field 'URL', set the post format to 'link'.
<?php
// Add to functions.php
add_action('save_post', 'rei_xmlrpc_process_post');
function rei_xmlrpc_process_post($post_id)
{
if (defined('XMLRPC_REQUEST') && XMLRPC_REQUEST)
{
@reinier
reinier / sublimetext2prefs
Last active October 13, 2015 17:38
My Sublime Text 3 preference file
{
"theme": "Soda Light 3.sublime-theme",
"soda_folder_icons": true,
"font_size": 16,
"font_face": "Menlo",
"line_padding_bottom": 1,
"line_padding_top": 1,
"caret_style": "wide",
@reinier
reinier / backup-webapps
Created November 28, 2012 09:56
Tar remote dir and rsync it to backup dir
alias backup-webapps="ssh -t user@domain 'tar zcvf webapps.tar.gz webapps' && mkdir ~/Documents/Backups/webapps-`date +%Y%m%d` && rsync -avz user@domain:/home/user/webapps.tar.gz ~/Documents/Backups/webapps-`date +%Y%m%d`"
@reinier
reinier / gist:3878708
Created October 12, 2012 11:06
remote connection + git pull
ssh -t user@domain.com 'cd /home/domain/public && git pull'
@reinier
reinier / functions.bash
Last active August 29, 2015 14:17
Handy terminal functions
# Functions for handy stuff
# Create a new directory and enter it.
# Example: `mkd new-dir`
function mkd() {
mkdir -p "$@" && cd "$@"
}
# Init a git repository and commit everything inside.
# Example: `initcommit`
@reinier
reinier / Brewfile
Last active August 29, 2015 13:56
A Brewfile for installing stuff on a fresh new Mac OS X installation
# Install [homebrew](http://brew.sh)
# > ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
#
# Run this file:
# > brew bundle Brewfile
#
# To install sublime-text-3 for example:
# > brew tap caskroom/versions
#
# At the end, start Alfred, close it and run:

Mac 'Wednesday' setup history

All (well, most of it) the apps & tools I installed on my Mac from clean install until now

Install xCode

Install Homebrew (check website for latest install code)

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"