start new:
tmux
start new with session name:
tmux new -s myname
#define MY_FUNCALL_ARGC 3 | |
VALUE my_funcall(VALUE receiver, ID method_id, int argc, ...); | |
VALUE my_funcall_ex(VALUE data); | |
VALUE my_funcall2(VALUE receiver, ID method_id, int argc, VALUE *argv); | |
VALUE my_funcall2_ex(VALUE data); | |
// my_rescue: exception handler used by both of the wrappers below. |
$stack, $draws = [], {} | |
def method_missing *args | |
return if args[0][/^to_/] | |
$stack << args.map { |a| a or $stack.pop } | |
$draws[$stack.pop(2)[0][0]] = args[1] if args[0] == :< | |
end | |
class Array | |
def +@ |
Tested against the WebKit git repo by entering the repo with 1 file dirty.
git diff --quiet --ignore-submodules HEAD
# Will tell if there are any uncomitted changes, staged or not.
0.6 sec
git diff-index --quiet HEAD
# Only tracked
2 sec
require 'llvm/core' | |
require 'llvm/execution_engine' | |
require 'llvm/transforms/scalar' | |
class Generator | |
attr_accessor :ptr | |
def build(code,name, mod) |
#include <string> | |
#include <ctime> | |
#include <msgpack.hpp> | |
struct message | |
{ | |
std::string tag; | |
std::time_t time; | |
std::string text; | |
MSGPACK_DEFINE(tag, time, text); |
#define USE_ROBIN_HOOD_HASH 1 | |
#define USE_SEPARATE_HASH_ARRAY 1 | |
template<class Key, class Value> | |
class hash_table | |
{ | |
static const int INITIAL_SIZE = 256; | |
static const int LOAD_FACTOR_PERCENT = 90; | |
struct elem |
/// This type is only every inhabited when S is nominally equivalent to T | |
pub type Is <S, T> = Is_ <S, T>; | |
priv struct Is_ <S, T>; | |
// Construct a proof of the fact that a type is nominally equivalent | |
// to itself. | |
pub fn Is <T> () -> Is <T, T> { Is_ } | |
pub impl <S, T> Is_ <S, T> { |
# prompt examples: | |
# [3 jobs master virtualenv] ~/code/myproject/foo | |
# [1 job my-branch virtualenv] ~/code/bar/ | |
# [virtualenv] ~/code/ | |
# ~ | |
# Very, very fast, only requiring a couple of fork()s (and no forking at all to determine the current git branch) | |
if [[ "$USER" == "root" ]] | |
then | |
export PS1="\e[1;31m\]\u \[\e[1;33m\]\w\[\e[0m\] "; |
Press minus + shift + s
and return
to chop/fold long lines!