Skip to content

Instantly share code, notes, and snippets.

View Superbil's full-sized avatar
:shipit:
Working in Cloud

Superbil Superbil

:shipit:
Working in Cloud
View GitHub Profile
@Superbil
Superbil / swf2svg.py
Created July 19, 2012 05:59
use pyswf to convert to svg
#!/usr/bin/python
import sys
if len(sys.argv) > 1:
file_name = sys.argv[1]
else:
print "no input file name"
exit()
from swf.movie import SWF
@Superbil
Superbil / .gitconfig
Created July 28, 2012 06:10
Git global config
[core]
pager = less -R
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
@Superbil
Superbil / .tmux.conf
Created September 2, 2012 17:00
my tmux config
# We won't worry about sending C-\ to any programs
# bind-key C-\ send-prefix
# hit C-\ twice to go to last window
bind-key C-\ last-window
bind-key b set-option status
# C-b is not acceptable, due to emacs, bash, and vim
unbind-key C-b
set -g prefix 'C-\'
@Superbil
Superbil / mount_folderOnHost.scpt
Last active October 20, 2015 07:18
try to mount folderOnHost on OSX
try
mount volume "smb://account@host/folderOnHost"
end try
@Superbil
Superbil / find_face.py
Created January 9, 2013 04:03
use openCV API to find face test on openCV 2.4.3
#!/usr/bin/env python
load_model = "haarcascade_frontalface_default.xml"
import sys
image_path = sys.argv[1]
# cv api 1
import cv
img = cv.LoadImage(image_path)
@Superbil
Superbil / find_face_by_video.py
Created January 9, 2013 04:06
use OpenCV API to find face from video steam
#!/usr/bin/env python
import cv
import cv2
window_name = "preview"
load_model = "haarcascade_frontalface_default.xml"
cv2.namedWindow(window_name)
vc = cv2.VideoCapture(0)
@Superbil
Superbil / ipython_config.py
Created January 9, 2013 07:34
my ipython config
# Configuration file for ipython.
c = get_config()
# set editor to emacs
c.InteractiveShell.editor = 'emacsclient -c'
c.IPythonWidget.editor = 'emacsclient -c'
# Dont' confirm when exit
c.TerminalInteractiveShell.confirm_exit = False
@Superbil
Superbil / RunEmacsWithDebugger.scpt
Last active December 11, 2015 02:09
run emacs lisp debugger, that can debugger init file Note: I use homebrew's emacs
try
do shell script "open -a `/usr/local/bin/brew --prefix emacs`/Emacs.app --args --debug-init"
on error errMsg
display dialog "homebrew or emacs not installed"
end try
#!/usr/bin/env python
def create_data_from_csv(file_name):
arr = []
with open('0209.csv', 'rb') as f:
r = csv.reader(f)
for row in r:
t = []
for i in row:
t.append(int(i))
@Superbil
Superbil / python.lisp
Last active December 13, 2015 22:29
python on emacs
;; python setup
(setq python-check-command "pyflakes")
;; python-mode setup
(autoload 'python-mode "python-mode" "Python editing mode." t)
;; load pymacs
(eval-after-load "python-mode"
'(progn
(require 'pymacs)