Skip to content

Instantly share code, notes, and snippets.

View shwang's full-sized avatar

Steven H. Wang shwang

  • Zürich, Switzerland
View GitHub Profile
package
{
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.events.Event;
/**
* A pretty quick implementation of Conway's Game Of Life
*
* @author Alec McEachran
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@cosimo
cosimo / parse-options.sh
Created September 21, 2012 09:31
Example of how to parse options with bash/getopt
#!/bin/bash
#
# Example of how to parse short/long options with 'getopt'
#
OPTS=`getopt -o vhns: --long verbose,dry-run,help,stack-size: -n 'parse-options' -- "$@"`
if [ $? != 0 ] ; then echo "Failed parsing options." >&2 ; exit 1 ; fi
echo "$OPTS"
@anthonywu
anthonywu / osx_pdf_join.sh
Created April 18, 2013 02:35
Mac OS X – bash function to join pdfs on the command line
function pdf_join {
join_py="/System/Library/Automator/Combine PDF Pages.action/Contents/Resources/join.py"
read -p "Name of output file > " output_file && "$join_py" -o $output_file $@ && open $output_file
}
@schovi
schovi / OSX cleanup.md
Last active February 8, 2024 01:58
My collection of resources how to keep your mac fresh, fast and with lot of disk space. Still **WORK IN PROGRESS**. If you have any comments and tips, give me comment. Like how to clean after python, clojure, etc etc
@aprxi
aprxi / Makefile
Last active July 26, 2021 07:13
Makefile_docker_20190214
# --------------------------------------------------------------------
# Copyright (c) 2019 LINKIT, The Netherlands. All Rights Reserved.
# Author(s): Anthony Potappel
#
# This software may be modified and distributed under the terms of the
# MIT license. See the LICENSE file for details.
# --------------------------------------------------------------------
# If you see pwd_unknown showing up, this is why. Re-calibrate your system.
PWD ?= pwd_unknown