Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

vvtommy

🎯
Focusing
Block or report user

Report or block vvtommy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View go.sh
#!/bin/bash
# This file is accessible as https://install.direct/go.sh
# Original source is located at github.com/v2ray/v2ray-core/release/install-release.sh
# If not specify, default meaning of return value:
# 0: Success
# 1: System error
# 2: Application error
# 3: Network error
View URL parsing Regex.js
/*
A single regex to parse and breakup a full URL including query parameters and anchors e.g.
https://www.google.com/dir/1/2/search.html?arg=0-a&arg1=1-b&arg3-c#hash
*/
Url.regex = /^((http[s]?|ftp):\/)?\/?([^:\/\s]+)((\/\w+)*\/)([\w\-\.]+[^#?\s]+)(.*)?(#[\w\-]+)?$/;
url: RegExp['$&'],
protocol: RegExp.$2,
host: RegExp.$3,
View 中国区号.csv
区号
010 北京 北京
020 广东 广州市
021 上海 上海
022 天津 天津
023 重庆 重庆
024 辽宁 沈阳市
025 江苏 南京市
027 湖北 武汉市
028 四川 眉山市
@vvtommy
vvtommy / nginxUserIdDecoder.php
Created Jun 30, 2015
Nginx User ID Decoder for PHP
View nginxUserIdDecoder.php
function nginxUserIdDecoder($userIdInCookie){
return join(array_map(function($i){return strtoupper(dechex($i));},unpack("L*", base64_decode("wKjHwFWR6Ka5RHopAwMNAg=="))), "");
}
@vvtommy
vvtommy / gist:88418fe220920a8f7167
Created Nov 27, 2014
阿里云 trusty apt source.list
View gist:88418fe220920a8f7167
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
View gist:8e959e795da78f2cf561
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
View gist:a2cd821c9e23d6d67294
# -*- coding: utf-8 -*-
import time
import random
import urllib2
import hashlib
import xml.etree.cElementTree as ET
import Tkinter as tk
import ScrolledText as st
@vvtommy
vvtommy / weichat-http-header.markdown
Last active Dec 30, 2015
微信访问 HTTP HEADER
View weichat-http-header.markdown

iPhone 4S / iOS 7.0.4 / 微信 5.0.3

Host: requestb.in
Accept-Language: zh-cn
Connection: close
Accept-Encoding: gzip, deflate
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 7_0_4 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Mobile/11B554a MicroMessenger/5.0.3
View OpenVPN-2.2.2-obfs.patch
--- openvpn-2.2.2.orig/options.c 2011-12-14 00:58:56.000000000 +0800
+++ openvpn-2.2.2/options.c 2012-12-21 10:44:57.683130505 +0800
@@ -54,6 +54,10 @@
#include "memdbg.h"
+extern char* _socket_obfs_salt;
+extern int _socket_obfs_salt_len;
+extern int _socket_obfs_padlen;
+
@vvtommy
vvtommy / CoffeeScript_Sublime_Plugin.0.5.3.patch
Created Dec 5, 2012
CoffeeScript-Sublime-Plugin 0.5.3 syntax highlighting patch
View CoffeeScript_Sublime_Plugin.0.5.3.patch
--- ./CoffeeScript.tmLanguage 2012-12-05 12:16:46.000000000 +0800
+++ /Users/vvtommy/CoffeeScript.tmLanguage 2012-12-05 12:15:51.000000000 +0800
@@ -262,7 +262,7 @@
</dict>
</dict>
<key>match</key>
- <string>([a-zA-Z\$_](\w|\$|\.)*\s*(?!\::)((:)|(=[^=]))(?!(\s*\(.*\))?\s*((=|-)&gt;)))</string>
+ <string>([a-zA-Z\$_](\w|\$|\.)*\s*(?!\::)((:)|(=))(?!(\s*\(.*\))?\s*((=|-)&gt;)))</string>
<key>name</key>
<string>variable.assignment.coffee</string>
You can’t perform that action at this time.