References a user in a commit message.
@ryah I am working on it.
Referene a particular issue by id.
| /usr/libexec/PlistBuddy -c 'Add :LSUIElement bool true' /Applications/iTerm.app/Contents/Info.plist | 
| /* | |
| * Copyright (C) 2012 Sebastian Kaspari | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software | 
| [hax]virbuntu$ cat vendor.java | |
| public class vendor { | |
| public static void main(String[] a) { | |
| System.out.println(System.getProperty("java.vendor")); | |
| System.out.println(System.getProperty("java.vendor.url")); | |
| System.out.println(System.getProperty("java.version")); | |
| } | |
| } | |
| [hax]virbuntu$ java -version | |
| java version "1.6.0_24" | 
| // swap the keybindings for paste and paste_and_indent | |
| { "keys": ["super+v"], "command": "paste_and_indent" }, | |
| { "keys": ["super+shift+v"], "command": "paste" } | 
Di sini kita akan membahas seputar pergerakan object di dalam game yang digerakkan dengan cara mengklik titik tujuan kemana object harus bergerak. Cara input seperti ini banyak digunakan untuk game-game RTS dan RPG.
Secara garis besar bisa kita jelaskan sebagai: menggerakkan object ke arah yang dituju. Cukup simpel. Tapi kalo menggampangkan, hasilnya tidak seperti yang kita harapkan; misal, ketika sampai di tujuan, object-nya bergerak bolak-balik.
Semisal object yang akan kita gerakkan berada di posisi A. Kita ingin menggerakkan object ini ke titik B.
Pertama kali, simpan titik tujuan ini, koordinat titik B, sebagai atribute dari sang object.
Langkah selanjutnya kita lakukan adalah mengurangkan koordinat titik tujuan dengan koordinat titik awal. Di sini kita akan mendapatkan (non-normalized) vector dari titik awal ke titik tujuan.
| #!/usr/bin/ruby | |
| # This script acts as a command-line filter to convert a BSON file (such as from mongodump) to an equivalent JSON file | |
| # The resulting JSON file will be an array of hashes | |
| # Any binary values from the BSON file are converted to base64 (such as Mongo's _id fields) | |
| # I originally wrote this script so that Mongo files can be easily used with jsawk for | |
| # offline data processing -- https://github.com/micha/jsawk | |
| # | |
| # To invoke, assuming mycollection.bson is a file from mongodump: | |
| # ruby bson2json.rb < mycollection.bson > mycollection.json | 
| # First install tmux | |
| brew install tmux | |
| # For mouse support (for switching panes and windows) | |
| # Only needed if you are using Terminal.app (iTerm has mouse support) | |
| Install http://www.culater.net/software/SIMBL/SIMBL.php | |
| Then install https://bitheap.org/mouseterm/ | |
| # More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/ | 
| # Send a metric to statsd from bash | |
| # | |
| # Useful for: | |
| # deploy scripts (http://codeascraft.etsy.com/2010/12/08/track-every-release/) | |
| # init scripts | |
| # sending metrics via crontab one-liners | |
| # sprinkling in existing bash scripts. | |
| # | |
| # netcat options: | |
| # -w timeout If a connection and stdin are idle for more than timeout seconds, then the connection is silently closed. | 
| #!/bin/bash | |
| VENV=$1 | |
| if [ -z $VENV ]; then | |
| echo "usage: runinenv [virtualenv_path] CMDS" | |
| exit 1 | |
| fi | |
| . ${VENV}/bin/activate | |
| shift 1 | |
| echo "Executing $@ in ${VENV}" | |
| exec "$@" |