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 / 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 / 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 / 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 / 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 / test.haml
Last active December 11, 2015 00:39
Tried some Markdown within Haml through CodeKit, because the latest update says "Markdown syntax is now fully supported in Haml files". But this doesn't work. Anyone knows how Markdown is supported in Haml through CodeKit?
!!! 5
%html{ :xmlns => "http://www.w3.org/1999/xhtml", :lang => "en", "xml:lang" => "en"}
%head
%title Sample Haml
%body
#example_header
:markdown
This is [Haml](http://en.wikipedia.org/wiki/Haml) with [Markdown](http://daringfireball.net/projects/markdown/)
@reinier
reinier / composer.json
Created February 6, 2013 16:11
Things to get controllers in a class
{
"require": {
"silex/silex": "1.0.*@dev"
}
}
{
"require": {
"silex/silex": "1.0.*@dev"
}
}
@reinier
reinier / set_responsive_class.js
Last active December 16, 2015 16:49
Set data attributes on body for responsive prototyping
function set_responsive_class(viewportwidth){
/* Small phones */
if (viewportwidth > 480) {
$("body").attr("data-viewport-bigger-than-mobile", "true");
}
/* Big phones */
if (viewportwidth > 767) {
$("body").attr("data-viewport-bigger-than-mobilelarge", "true");
@mixin mq($size) {
/* Desktop */
@if $size == "max" {
@media (min-width: 1200px) {
@content;
}
/* Landscape tablet and desktop small */
} @else if $size == "large" {

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)"