As configured in my dotfiles.
start new:
tmux
start new with session name:
#!/bin/sh | |
# Build Zsh from sources on Ubuntu. | |
# From http://zsh.sourceforge.net/Arc/git.html and sources INSTALL file. | |
# Some packages may be missing | |
sudo apt-get install -y git-core gcc make autoconf yodl libncursesw5-dev texinfo | |
git clone git://zsh.git.sf.net/gitroot/zsh/zsh | |
cd zsh |
As configured in my dotfiles.
start new:
tmux
start new with session name:
from ctypes import cdll | |
from ctypes import CFUNCTYPE, sizeof, POINTER, c_int | |
from ctypes import Structure | |
libc = cdll.LoadLibrary("libc.so.6") | |
import random | |
class Point(Structure): | |
_fields_ = [("x", c_int), | |
("y", c_int)] |
virtualenv --no-site-packages hodor | |
hodor/bin/pip install simplejson ujson cbor tnetstring msgpack-python | |
curl -s 'http://www.json-generator.com/api/json/get/cvfsLVmKiG?indent=2' > test.json | |
hodor/bin/python shootout.py |
#ack is a tool like grep, designed for programmers with large trees of heterogeneous source code | |
#to install ack, see http://betterthangrep.com/ | |
#to use ack, launch terminal (mac osx) and type 'ack <some_keywords>' | |
#ack will search all files in the current directory & sub-directories | |
#here's how I have my config file setup. this file is located on mac osx here | |
# ~/.ackrc | |
# Always sort the files |
(function() { | |
void(d = document); | |
void(el = d.getElementsByTagName('link')); | |
void(g = false); | |
void(count = 0); | |
for (i = 0; i < el.length; i++) { | |
if (el[i].getAttribute('rel').indexOf('alternate') != -1) { | |
if(count == 0) { | |
ty = el[i].getAttribute('type'); | |
if(ty.indexOf('application/rss+xml') != -1 || ty.indexOf('text/xml') != -1) { |
# Disable crontab -r | |
function crontab () | |
{ | |
# Replace -r with -e | |
/usr/bin/crontab "${@/-r/-e}" | |
} |
##destro()〜なアップデート | |
#chart = new Highcharts.Chart(options)がすでに描画されているケースでは | |
$.getJSON('hoge.json',function(data){ | |
chart.destroy() | |
options.xAxis = data[1]; | |
options.series = data[0]['datas']; | |
chart = new Highcharts.Chart(options); | |
}); | |
##redraw()を利用したアップデート |
#!/bin/sh | |
# This is a skeleton of a bash daemon. To use for yourself, just set the | |
# daemonName variable and then enter in the commands to run in the doCommands | |
# function. Modify the variables just below to fit your preference. | |
daemonName="DAEMON-NAME" | |
pidDir="." | |
pidFile="$pidDir/$daemonName.pid" |
# vim style tmux config | |
# use C-a, since it's on the home row and easier to hit than C-b | |
set-option -g prefix C-a | |
unbind-key C-a | |
bind-key C-a send-prefix | |
set -g base-index 1 | |
# Easy config reload | |
bind-key R source-file ~/.tmux.conf \; display-message "tmux.conf reloaded." |