Skip to content

Instantly share code, notes, and snippets.

@tokudu
tokudu / deploy.sh
Created November 14, 2012 02:41
A simple deployment script for EC2 instances
#!/bin/bash
# Updates all EC2 instances from git
# Author: anton@sothree.com
CODE_LOCATION=/var/www/your_project
SERVER_PREFIX=your_project
# exit if something fails
set -e
@tokudu
tokudu / ec2ssh.sh
Created October 27, 2012 23:55
A helper script for SSH'ing into EC2 instances by name
#!/bin/bash
# SSH into an EC2 instance by name
# Author: tokudu@github.com (SoThree.com).
set -e
if [ $# -lt 1 ]
then
echo "Usage: `basename $0` instance_name"
exit 1
fi
@tokudu
tokudu / pretty_print.php
Created March 12, 2011 23:26
A function to pretty print a associative array in PHP
<?php
function debug($var = false) {
echo "\n<pre style=\"background: #FFFF99; font-size: 10px;\">\n";
$var = print_r($var, true);
echo $var . "\n</pre>\n";
}
?>
<?xml version="1.0" encoding="utf-8"?>
<com.tokudu.begemot.widgets.CheckableLinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dip"
android:orientation="vertical"
>
<CheckedTextView
android:id="@+id/user_name"
package com.tokudu.begemot.widgets;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.Checkable;
import android.widget.CheckedTextView;
import android.widget.LinearLayout;
/*