Skip to content

Instantly share code, notes, and snippets.

View xcodebuild's full-sized avatar
💭
Busy

xcodebuild xcodebuild

💭
Busy
View GitHub Profile
@xcodebuild
xcodebuild / mk_index.py
Created April 4, 2016 04:21
Generate sidebar for github wiki
import os
def createIndexFile(startpath, indexFile):
for root, dirs, files in os.walk(startpath):
files = [f for f in files if not (f[0] == '.' or f[0] == '_')]
dirs[:] = [d for d in dirs if not (d[0] == '.' or d[0] == '_')]
level = root.replace(startpath, '').count(os.sep) - 1
indent = ' ' * 2 * (level)
directory = os.path.basename(root)
if directory != '.':
@xcodebuild
xcodebuild / freess.py
Last active October 12, 2016 03:43
Update MEOW config with free shadowsocks provider
#!/usr/bin/python
# -*- coding: utf-8 -*-
import urllib
import re
import os
from os.path import expanduser
url = "http://freevpnss.cc/"
page = urllib.urlopen(url).read()
r = re.compile('码:\d+')
*.gslbsvc.net.cn;
*.chinacache.com.cn;
*.ccgslb.net;
*.gslbsvc.com.cn;
*.cdnsvc.cn;
*.ccgslb.cn;
*.cdn2cdn.net;
*.blueit.org.cn;
*.cc-1.com;
*.cdnsvc.net;
function exchange(str, a, b) {
return str.split(a).map(function(item){return item.replace(new RegExp(b, 'g'), a)}).join(b);
}
function safeSingleQuote(str) {
str = exchange(str, "'", '"');
return exchange(JSON.stringify(str), "'", '"');
}
Switch(window, exe) {
IfWinActive, %window%
WinMinimize, %window%
else
IfWinNotExist, %window%
Run, %exe%
else
WinActivate, %window%
}
import view from './view';
import model from './model';
import proptypes from './proptypes';
import { merge } from './utils';
import { render } from 'react-dom';
const Comp = merge(view, model, proptypes);
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
!c::send ^c
!x::send ^x
!v::send ^v
!l::send ^l
!s::send ^s
@xcodebuild
xcodebuild / My Activity
Last active October 29, 2020 14:54
My Activity
🗣 Commented on #180 in alibaba/lightproxy
🗣 Commented on #215 in alibaba/lightproxy
🗣 Commented on #216 in alibaba/lightproxy
🗣 Commented on #212 in alibaba/lightproxy
🗣 Commented on #212 in alibaba/lightproxy
call plug#begin('~/.vim/plugged')
Plug 'junegunn/vim-easy-align'
Plug 'preservim/nerdtree'
Plug 'Shougo/vimproc.vim', {'do' : 'make'}
Plug 'ctrlpvim/ctrlp.vim'
Plug 'sickill/vim-monokai'
Plug 'fisadev/vim-ctrlp-cmdpalette'
Plug 'neoclide/jsonc.vim'
Plug 'Yggdroot/indentLine'
Plug 'Chiel92/vim-autoformat'