Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View vvtommy's full-sized avatar
🏠
Working from home

vvtommy

🏠
Working from home
View GitHub Profile
@vvtommy
vvtommy / php.rb
Created April 11, 2023 03:42 — forked from jeroenoldenburger/php.rb
PHP 5.2 Formula for Homebrew
require 'formula'
def mysql_installed?
`which mysql_config`.length > 0
end
class Php < Formula
url 'http://ca2.php.net/distributions/php-5.2.17.tar.gz'
homepage ''
md5 '04d321d5aeb9d3a051233dbd24220ef1'
@vvtommy
vvtommy / PLACEHOLDER.MD
Last active August 15, 2022 13:41
PLACEHOLDER.profile

👽

@vvtommy
vvtommy / markdown_example.md
Created December 4, 2012 04:41
markdown语法示例

首先声名,这并不是一份完整的[Markdown][1]的语法介绍,需要看完整的介绍请点击[Markdown Syntax Documentation][2]。

本文的Markdown源代码可以至后台编辑文章进行查看,文章结尾也将以源代码的形式贴出

段落

一个段落是由一个或多个连续的行构成,段落间靠一个或以上视觉上的空行划分。一般的段落不应该用空格或制表符缩进

这是一个段落。它有两个句子。
@vvtommy
vvtommy / weichat-http-header.markdown
Last active October 29, 2019 07:05
微信访问 HTTP HEADER

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
#!/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
@vvtommy
vvtommy / URL parsing Regex.js
Created July 9, 2018 15:02 — forked from metafeather/URL parsing Regex.js
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&amp;arg3-c#hash
*/
Url.regex = /^((http[s]?|ftp):\/)?\/?([^:\/\s]+)((\/\w+)*\/)([\w\-\.]+[^#?\s]+)(.*)?(#[\w\-]+)?$/;
url: RegExp['$&'],
protocol: RegExp.$2,
host: RegExp.$3,
区号
010 北京 北京
020 广东 广州市
021 上海 上海
022 天津 天津
023 重庆 重庆
024 辽宁 沈阳市
025 江苏 南京市
027 湖北 武汉市
028 四川 眉山市
--- 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 December 5, 2012 04:21
CoffeeScript-Sublime-Plugin 0.5.3 syntax highlighting 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>
@vvtommy
vvtommy / gist_usage_example.js
Created December 3, 2012 09:37
介绍Wordpress Gist插件所做的实例
/**
* debug function
* dumps out objects
* @param {object} obj object that needs to bee printed to the log
* @return {string}
*/function dump(obj) {
var out = '';
for (var i in obj) {
out += i + ": " + obj[i] + "\n";
}