Skip to content

Instantly share code, notes, and snippets.

View jetsanix's full-sized avatar
💭
💭💭💭

jet tsang zeon-git jetsanix

💭
💭💭💭
View GitHub Profile
@Machx
Machx / Blackboard.dvtcolortheme
Created February 4, 2011 20:02
Blackboard theme from TextMate for Xcode 4
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DVTConsoleDebuggerInputTextColor</key>
<string>1 1 1 1</string>
<key>DVTConsoleDebuggerInputTextFont</key>
<string>Menlo-Bold - 11.0</string>
<key>DVTConsoleDebuggerOutputTextColor</key>
<string>1 1 1 1</string>
@vmihailenco
vmihailenco / proxy.go
Created November 20, 2011 15:22
Simple TCP proxy in Golang
package main
import (
"bytes"
"encoding/hex"
"flag"
"fmt"
"io"
"log"
"net"
@drewjoh
drewjoh / custom.js
Created January 27, 2012 13:55
Dynamic (AJAX) loaded Bootstrap Modal (Bootstrap 2.1)
$(document).ready(function() {
// Support for AJAX loaded modal window.
// Focuses on first input textbox after it loads the window.
$('[data-toggle="modal"]').click(function(e) {
e.preventDefault();
var url = $(this).attr('href');
if (url.indexOf('#') == 0) {
$(url).modal('open');
} else {
@brantfaircloth
brantfaircloth / convert-bcl-to-fastq.rst
Created July 16, 2012 23:44
Convert BCL files to fastq

Install dependencies and Casava

The following assumes you are converting BCL files containing PE100 reads with a 10 nt index read. You can allow Casava to demultiplex for you or do it on your own, later. You can adjust values below if you are doing something different (e.g. shorter reads, longer indexes) but be careful.

  • You need a pretty beefy machine. Illumina recommends something with multiple cores and 48 GB RAM, running Centos 5. Centos 6 also works just fine. See their recommendations here:
@jetsanix
jetsanix / reset_app_store.sh
Created July 26, 2012 00:19
Reset the App Store on Os X Mountain Lion
#!/bin/sh
rm ~/Library/Preferences/com.apple.appstore.plist
rm -r ~/Library/Saved\ Application\ State/com.apple.appstore.savedState
rm -r ~/Library/Caches/com.apple.appstore
rm -r /private/var/folders/*/*/*/com.apple.appstore
@b123400
b123400 / three.php
Created August 13, 2012 21:00
3HK data usage getter
<?php
//There is no public API therefore this is not so reliable, use it at your own risk
function search_string($string , $regex , $index=1){
$pattern = "~".$regex."~";
preg_match($pattern, $string, $matches);
//var_dump($matches);
return $matches[$index];
}
function getDataUsageFromThreeAccount($mobileNo,$password){
$loginURL="http://www.three.com.hk/appCS2/verifyLogin.do?lang=eng";
@border
border / mgoExample.go
Created August 27, 2012 15:33
mgo example
package main
import (
"fmt"
"labix.org/v2/mgo"
"labix.org/v2/mgo/bson"
"time"
)
type Person struct {
$.fn.vectorMap('addMap', 'cn_merc_en',{"insets": [{"width": 560, "top": 0, "height": 470, "bbox": [{"y": -7092705.234177706, "x": 8197509.958779432}, {"y": -2058430.530198134, "x": 15010424.448806616}], "left": 0}],
"paths": {
aomen:{
name : "澳门特区",
path: "M413.032,414.183l-0.96,1.752c0,0,0.889,0.883,1.98,1.086s1.995-0.493,1.995-0.493L413.032,414.183z"},
hongkong:{
name : "香港特区",
path: "M417.745,409.005l3.394,0.773l3.453-2.558l1.666,4.582c0,0-5.521,2.673-3.691,1.785c1.828-0.884-4.641-0.355-4.641-0.355l-0.834-3.454L417.745,409.005z"},
taiwan:{
name : "台湾省",
@ikbear
ikbear / NetScreen.md
Created December 5, 2012 17:17
NetScreen的往事

下面是陈首席陈临怀发表在微博上的 [NetScreen的往事],我在看的过程中将其拷贝出来,整理成文,方便想看的人一口气看完。微博见:http://weibo.com/huailinchen

[NetScreen的往事]下午要在厦门见邓锋。突然又想起了许多NetScreen的往事。我是一个能写代码的文艺青年。决定在weibo上,来写写过去,算作为逐渐老去的我们的一点纪念。。。

[NetScreen的往事(1)]2001年的9月11日的早晨。我大概7点左右被人叫醒。纽约遭遇攻击!“。在电视上我看着第2架飞机冲入Tower Building,恍惚做梦一般。。。 上午去公司。。。大家都很担心。知道NetScreen的创办人Feng和Yan也在纽约,处理公司上市的事情。大家都很担心他们。我们是兄弟。

[NetScreen的往事(2)]应该是中午的时候传来消息。他们已经跑到亚特兰大去了。在等待转机。。。大家都在等着他们的回来。记得是晚上7点左右,夏天的加州,依然天很亮。我和Shalang(现Juniper Beijing Director)在楼下抽烟。看见Feng和Yan下车了。。。我是个很感情化的人,冲上去拥抱了Feng。

[NetScreen的往事(3)]Yan是个比较严肃的人,而我的工作基本上是他和Yuming[Palo Alto创办人,今年上市,发大了]直接领导。他经常修理我。有点怕他。不敢和他拥抱。Feng很随和,喜欢开玩笑[含黄色段子]。大家都喜欢他。。。

@louiszuckerman
louiszuckerman / gfid-resolver.sh
Last active November 29, 2023 10:01
Glusterfs GFID Resolver Turns a GFID into a real path in the brick
#!/bin/bash
if [[ "$#" < "2" || "$#" > "3" ]]; then
cat <<END
Glusterfs GFID resolver -- turns a GFID into a real file path
Usage: $0 <brick-path> <gfid> [-q]
<brick-path> : the path to your glusterfs brick (required)