As configured in my dotfiles.
start new:
tmux
start new with session name:
# 0 is too far from ` ;) | |
set -g base-index 1 | |
# Automatically set window title | |
set-window-option -g automatic-rename on | |
set-option -g set-titles on | |
#set -g default-terminal screen-256color | |
set -g status-keys vi | |
set -g history-limit 10000 |
As configured in my dotfiles.
start new:
tmux
start new with session name:
import org.json.JSONArray; | |
import org.json.JSONException; | |
import org.json.JSONObject; | |
import java.util.*; | |
public class JsonHelper { | |
public static Object toJSON(Object object) throws JSONException { | |
if (object instanceof Map) { | |
JSONObject json = new JSONObject(); |
#!/bin/bash | |
# bash generate random alphanumeric string | |
# | |
# bash generate random 32 character alphanumeric string (upper and lowercase) and | |
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
# bash generate random 32 character alphanumeric string (lowercase only) | |
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1 |
#define DEBUG_LEVEL_LOG | |
#define DEBUG_LEVEL_WARN | |
#define DEBUG_LEVEL_ERROR | |
using UnityEngine; | |
using System.Collections; | |
// setting the conditional to the platform of choice will only compile the method for that platform |
var casper = require('casper').create({ | |
viewportSize: {width: 950, height: 950} | |
}); | |
casper.start('http://www.google.com/', function() { | |
this.captureSelector('/tmp/pp.png', 'body'); | |
}); | |
casper.run(); |
// Credit to damien_oconnell from http://forum.unity3d.com/threads/39513-Click-drag-camera-movement | |
// for using the mouse displacement for calculating the amount of camera movement and panning code. | |
using UnityEngine; | |
using System.Collections; | |
public class MoveCamera : MonoBehaviour | |
{ | |
// | |
// VARIABLES |
#!/bin/sh | |
# one way (older scala version will be installed) | |
# sudo apt-get install scala | |
#2nd way | |
sudo apt-get remove scala-library scala | |
wget http://www.scala-lang.org/files/archive/scala-2.11.4.deb | |
sudo dpkg -i scala-2.11.4.deb | |
sudo apt-get update |
The Ember router is getting number of enhancements that will greatly enhance its power, reliability, predictability, and ability to handle asynchronous loading logic (so many abilities), particularly when used in conjunction with promises, though the API is friendly enough that a deep understanding of promises is not required for the simpler use cases.
# Outputs the reading time | |
# Read this in “about 4 minutes” | |
# Put into your _plugins dir in your Jekyll site | |
# Usage: Read this in about {{ page.content | reading_time }} | |
module ReadingTimeFilter | |
def reading_time( input ) | |
words_per_minute = 180 |