start new:
tmux
start new with session name:
tmux new -s myname
var abs = Math.abs; | |
var sqrt = Math.sqrt; | |
var floor = Math.floor; | |
var min = Math.min; | |
var V3 = function(x, y, z) { | |
this.x = x; | |
this.y = y; | |
this.z = z; | |
} |
% -------------------------------------------------------------- | |
% This is all preamble stuff that you don't have to worry about. | |
% Head down to where it says "Start here" | |
% -------------------------------------------------------------- | |
\documentclass[12pt]{article} | |
\usepackage[margin=1in]{geometry} | |
\usepackage{amsmath,amsthm,amssymb} | |
/usr/bin/plutil -convert xml1 -o - ~/Library/Safari/Bookmarks.plist | grep -E -o '<string>http[s]{0,1}://.*</string>' | grep -v icloud | sed -E 's/<\/{0,1}string>//g' |
// C++ includes used for precompiling -*- C++ -*- | |
// Copyright (C) 2003-2013 Free Software Foundation, Inc. | |
// | |
// This file is part of the GNU ISO C++ Library. This library is free | |
// software; you can redistribute it and/or modify it under the | |
// terms of the GNU General Public License as published by the | |
// Free Software Foundation; either version 3, or (at your option) | |
// any later version. |
import sys | |
""" | |
A simple and powerful `Brainfuck` interpreter implementation in Python | |
Steal from: http://blog.csdn.net/redraiment/article/details/7483062 | |
""" | |
def _gen_array(length): | |
return [0 for i in range(0, length)] |
#!/usr/bin/env python | |
from pocket import Pocket | |
import webbrowser, sys | |
# Get consumer key from cmd line | |
consumer_key = sys.argv[1] | |
request_token = Pocket.get_request_token( | |
consumer_key=consumer_key, |
#!/usr/bin/env bash
# Assuming OS X Yosemite 10.10.4
# Install XCode and command line tools
# See https://itunes.apple.com/us/app/xcode/id497799835?mt=12#
# See https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcode-select.1.html
xcode-select --install
# Input data | |
list_0 = [1, 3, 6, 7, 8, 9, 10, 2, 3, 4] | |
list_1 = [12, 56, 3, 78, 34, 56, 2, 10] | |
list_2 = [123, 567, 234, 890] | |
list_3 = [5, 7, 8, 9, 3, -2, -4, -2, 5, 6, 8, 11, 2] | |
# Iterative algorithm | |
def maximum(L): | |
biggest_item = L[0] | |
for item in L: |