- download and install
pyenv
via github
$ git clone https://github.com/yyuu/pyenv.git ~/.pyenv
- add the following to
~/.bash_profile
<?xml version="1.0"?> | |
<Module> | |
<ModulePrefs title="Gist"> | |
<Require feature="dynamic-height"/> | |
</ModulePrefs> | |
<UserPref name="id" display_name="Gist ID" required="true" default_value="10683373"/> | |
<UserPref name="font_size" display_name="Font size (px)" required="true" default_value="12"/> | |
<UserPref name="line_height" display_name="Line height (px)" required="true" default_value="16"/> | |
<Content type="html"> | |
<![CDATA[ |
CC = gcc | |
LD = gcc | |
CFLAGS = -Wall -Wextra -O2 | |
LDFLAGS = #-lpthread -lm | |
SRCS := $(wildcard *.c) | |
OBJS = $(SRCS:.c=.o) | |
DEPS = $(SRCS:.c=.dep) | |
EXEC = $(SRCS:.c=) | |
RM = rm -f |
Host github.com | |
User somebody@somewhere.com | |
Port 22 | |
Hostname github.com | |
IdentityFile ~/.ssh/github | |
IdentitiesOnly yes | |
Host * | |
ControlMaster auto | |
ControlPath ~/.ssh/mux-%r@%h:%p |
This script works as a wrapper for sbatch command.
Usage:
sherlock-one-liner python --version
#!/bin/bash | |
# parse args | |
if [ $# -lt 2 ] ; then | |
echo "usage: $0 <target-server> <login-server> [local port (default: 18888)] [target port (default: 8888)] [login port (default: rand)]" >&2 | |
exit 1 | |
fi | |
target=$1 |
Int.MaxValue // Int の最大値 | |
Int.MinValue // Int の最小値 | |
Long.MaxValue // Long の最大値 | |
Long.MinValue // Long の最小値 | |
Byte.MaxValue // Byte の最大値 | |
Byte.MinValue // Byte の最小値 | |
Short.MaxValue // Short の最大値 |
# DESCRIPTION OF PROBLEM: Implementations of sed, readlink, zcat, etc. are different on OS X and Linux. | |
# NOTE: Put this on top of your script using sed, readlink, zcat, etc. that should work alike on Mac OS X. | |
# cross-OS compatibility (greadlink, gsed, zcat are GNU implementations for OS X) | |
[[ `uname` == 'Darwin' ]] && { | |
which greadlink gsed gzcat > /dev/null && { | |
unalias readlink sed zcat | |
alias readlink=greadlink sed=gsed zcat=gzcat | |
} || { | |
echo 'ERROR: GNU utils required for Mac. You may use homebrew to install them: brew install coreutils gnu-sed' |
# Thanks to @samsonjs for the cleaned up version: | |
# https://gist.github.com/samsonjs/4076746 | |
PREFIX=$HOME | |
VERSION=1.2.3 | |
# Install Protocol Buffers | |
wget http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.bz2 | |
tar -xf protobuf-2.4.1.tar.bz2 | |
cd protobuf-2.4.1 |