Skip to content

Instantly share code, notes, and snippets.

View zilongshanren's full-sized avatar
🎯
Focusing

子龙山人 zilongshanren

🎯
Focusing
View GitHub Profile
@zilongshanren
zilongshanren / spidermonkey-android.sh
Created September 29, 2014 05:41
build spidermonkey on android
# options
develop=
release=
RELEASE_DIR="spidermonkey-android"
usage(){
cat << EOF
usage: $0 [options]
Build SpiderMonkey using Android NDK
@zilongshanren
zilongshanren / simple_args_parsing.sh
Last active April 8, 2016 02:46 — forked from jehiah/simple_args_parsing.sh
bash script: adding command line option
#!/bin/sh
#
# a simple way to parse shell script arguments
#
# please edit and use to your hearts content
#
ENVIRONMENT="dev"
@zilongshanren
zilongshanren / command-line-option-parser
Created November 18, 2014 08:11
Python command line option parser
#!/usr/bin/env python
"""Helper to build all the 3rd party libraries for cocos2d-x on various platform.
Usage:
build.py --platform=NAME [--libs=LIBNAME] [--arch=ARCH] [--mode=MODE] [--api=<kn>] [--gcc=<kn>]
build.py (-h | --help)
build.py --version
build.py --list
@zilongshanren
zilongshanren / generate_cocos2dx_deps.sh
Last active August 29, 2015 14:11
generate cocos2d-x deps
# [[ -z $1 ]] && echo "you should pass a tag name to it, the name should be a number" && exit 1
# [[ -z $2 ]] && echo "you should pass a branch name to it, the name should be a number" && exit 1
branchname=$2
tagname=$1
branch=${branchname:-3}
repository_name=cocos2d-x-3rd-party-libs-bin
cd ./$repository_name
default_version=`git tag -l | grep -e 'v3' | sort -r -k 1.9n | tail -1 | awk -F- '{print $3}'`
@zilongshanren
zilongshanren / curl_multi_test.c
Last active April 8, 2016 02:44 — forked from clemensg/curl_multi_test.c
curl basic test program
/* curl_multi_test.c
Clemens Gruber, 2013
<clemens.gruber@pqgruber.com>
Code description:
Requests 4 Web pages via the CURL multi interface
and checks if the HTTP status code is 200.
Update: Fixed! The check for !numfds was the problem.
@zilongshanren
zilongshanren / emacs-email-setup.md
Last active April 8, 2016 02:40 — forked from areina/emacs-email-setup.md
gmail account in emacs with mu4e

Manage your gmail account in emacs with mu4e

There're a lot of combinations to manage your email with emacs, but this works for me. I've a backup and I can manage my daily email.

The stack:

  • emacs
  • offlineimap
  • mu
  • mu4e
@zilongshanren
zilongshanren / super.el
Last active April 8, 2016 02:25 — forked from Pitometsu/super.el
emacs super key convinent binidngs
;; mac os x style
(global-set-key (kbd "s-S") 'write-file)
(global-set-key (kbd "s-s") 'save-buffer)
(global-set-key (kbd "s-i") 'dired-jump-other-window)
(global-set-key (kbd "s-l") 'goto-line)
(global-set-key (kbd "s-q") 'save-buffers-kill-emacs)
(global-set-key (kbd "s-x") 'kill-region)
(global-set-key (kbd "s-c") 'kill-ring-save)
(global-set-key (kbd "s-v") 'yank)
(global-set-key (kbd "s-a") 'mark-whole-buffer)
@zilongshanren
zilongshanren / .ctags
Last active April 8, 2016 02:24 — forked from redguardtoo/.ctags.sample
my personal .ctags template
--exclude=*.hg*
--exclude=*.cvs*
--exclude=*.svn*
--exclude=*.git*
--exclude=*compiled*
--exclude=*public_html*
--exclude=*.idea*
--exclude=*bower_components*
--exclude=*images*
--exclude=*.DS_Store*
# Generated by YCM Generator at 2015-05-15 15:49:14.054902
# This file is NOT licensed under the GPLv3, which is the license for the rest
# of YouCompleteMe.
#
# Here's the license text for this file:
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
map <C-u> u
map <C-d> d
map <C-n> K
map <C-p> J