Skip to content

Instantly share code, notes, and snippets.

View twlz0ne's full-sized avatar

twlz0ne

  • Fuzhou, China
View GitHub Profile
@twlz0ne
twlz0ne / script2bundle.sh
Created May 8, 2013 17:02
Convert apple/shell script to bundle
#!/bin/bash
# @brief convert apple/shell script to bundle
# @version 0.1
# @auther gongqijian
# @date 2013/05/09
set -e
if [ $# -lt 1 ]; then
@twlz0ne
twlz0ne / runemacs.applescript
Created October 18, 2013 06:57
Emacs(emacsformacosx) startup script
-- @brief emacs startup script
-- @author gongqijian
-- @date 2013/04/28
--
-- Usage:
--
-- 把 applescript 转换成 bundle,跟配置文件 _emacs.d 放在同一个目录下:
-- .
-- |- runemacs.app
-- |- _emacs.d
@twlz0ne
twlz0ne / group.js
Last active December 27, 2015 07:19
福州豆瓣租房团小组书签
var group = new (function() {
var foo = function() {
var recruit = new Array(); //招租
var recruit_roommate = new Array(); //招合租
var wanted = new Array(); //求租
var wanted_roomate = new Array(); //求合租
var others = new Array(); //其他
for (var i = 0; i < 5; i++) {
$.ajax({type : 'get',
ParentCtrl = function($scope) {
$scope.validate = function() {
//...
}
$scope.edit = function(item) {
//...
$scope.validate();
//...
}

豆瓣爬山群 2013 年年会

时间:29号晚6:30(请务必准时到达)

地点:金鸡山瑞和楼

主题:交换礼物信件,吃喝聊天,总结过去,展望未来

费用:预收¥100/人(吃喝以及场地费用,不包含礼物),多还少补

@twlz0ne
twlz0ne / kcpassword.pl
Last active February 20, 2016 02:51
Securely auto login Mac OS X ## Usage: curl -O https://raw.github.com/gist/5479944/safe-autologin.sh && sh ./safe-autologin.sh
#!/usr/bin/perl
# Gavin Brock (http://brock-family.org/gavin/perl) - June 2007
#==============================================================================#
use strict;
use warnings;
use Foundation;
#==============================================================================#
$ proxychains4 -q npm install
DEBUG:init_lib_wrapper called from gcc_init
DEBUG:pid[20934]:at_init
DEBUG:pid[20934]:wait_data
DEBUG:added localnet: netaddr=127.0.0.0, netmask=255.0.0.0
DEBUG:added localnet: netaddr=10.0.0.0, netmask=255.0.0.0
DEBUG:added localnet: netaddr=172.16.0.0, netmask=255.240.0.0
DEBUG:added localnet: netaddr=192.168.0.0, netmask=255.255.0.0
DEBUG:[play] socks5 127.0.0.1:1080
DEBUG:loaded symbol 'connect' real addr 0x7fff9299c528 wrapped addr 0x10c878ec1
@twlz0ne
twlz0ne / javascript-garden-epub.py
Created September 28, 2016 08:12
Generate epub of JavaScript-Garden from markdown
#!/usr/bin/env python
# -*- code: utf-8 -*-
#
# Generate epub from markdown
#
# Usage:
# cd /path/to/repo
# python javascript-garden-epub.py [lang]
#
@twlz0ne
twlz0ne / # vim - 2017-05-01_01-37-18.txt
Created April 30, 2017 17:49
vim on macOS 10.11.6 - Homebrew build logs
Homebrew build logs for vim on macOS 10.11.6
Build date: 2017-05-01 01:37:18