Skip to content

Instantly share code, notes, and snippets.

# Q-Search
# Modified by nzw9314
# From Neurogram (https://raw.githubusercontent.com/Neurogram-R/Surge/master/module/Q-Search.sgmodule)
# - Safari 内输入 命令 + 空格 + 关键词 快速指定搜索引擎搜索
# 注:先进入设置更改 Safari 默认搜索为 DuckDuckGO
# 可自行修改指令或者添加搜索引擎
# gh: GitHub搜索
# gm: Google图片搜索
# sof: Stack Overflow
void(window.open('http://pushbullet.com/push/link?title='+encodeURIComponent(document.title)+'&url='+encodeURIComponent(location.href)+'&device_iden=[Your Device ID]'))
cinst Switcheroo
cinst Ditto
cinst Listary
<?php
function pre_print_r($var){ echo "<pre>"; print_r($var); echo "</pre>"; echo "<br />"; };
$tmpa = 'Ägypten';
$tmpb = 'Österreich';
$tmpc = 'ÜbereinfuhrÜ';
$d = str_split($tmpa);
$e = str_split($tmpb);
@panfeng
panfeng / .vromerc
Last active January 17, 2016 15:14
""" .vromerc example file
" Note: sync with wiki
" Change key mapping in normal mode, please check Vrome Features for available key mapping
map j <C-f>
map j 10j
map k 10k
" Remove key mapping in normal mode
" unmap <C-f>
<?php $tmp =array (
'Version' =>
array (
0 => '2.3.5',
1 => '2.3.1',
2 => '2.3',
3 => '2.2',
4 => '2.1.2',
5 => '2.1.1',
6 => '2.1',
USE AN ALIAS FOR SUBLIMETEXT
Powershell cmd below:
Test-Path $Profile
New-Item –Path $Profile –Type File –Force
Set-Alias subl "C:\Program Files\Sublime Text 3\sublime_text.exe"
subl .
This will load the current directory as a project in SublimeText from the command line.
@panfeng
panfeng / adblock_for_ios.js
Created October 14, 2014 00:17
no need to prison break youo phone, setting=>wi-fi=> select the one your are using, and choose auto=>paste the raw file url to "Auto"
var PROXY_DIRECT = "DIRECT";
var DIRECT = "DIRECT";
var BLACK = "PROXY 8.8.8.8:53";
var WHITE = PROXY_DIRECT;
function s(u, r) {
return shExpMatch(u, r);
}
function d(h, r) {
@panfeng
panfeng / Google_IME.lua
Last active August 29, 2015 14:07
直接在_MAPPING_TABLE 加入“键”\tab”值“即可。谷歌中文输入法的词组导出后为dis文件后,记事本打开直接复制到_MAPPING_TABLE就可用了。当然也可把这个扩展放到dropbox里,可以随时编辑随时同步。我在谷歌拼音的自定义词虽然时时同步,但是丢了不少!还是拽在自己手里安心。
-- http://www.google.com/intl/zh-CN/ime/pinyin/api.html
--参考谷歌输入法 base.lua
-- Google pinyin 定义的数据结构,通过ime.parse_mapping函数parse为标准lua表
-- 之前见过的lua扩展都是里面的TABLE都是 key value1,value2,value2 ...
-- 不符合我输入的要求,例如value不能包含有分界符(默认逗号),每行一键多值,得多长啊
-- 每一行代表 "按键" \t "返回值"
-- TABLE内数据接近两千行的时候,虽然GooglePinyinApiConsole.exe能返回正确的值,但谷歌输入法无反应。
-- 一千行的时候还是还行的。
@panfeng
panfeng / Note_of_Math_For_Programmers.md
Last active August 29, 2015 14:07
Note of Math For Programmers

Math For Programmers

Virtual Memory from 0 to n, map fromm virtual memory to physical memory

####Inside of Memory Location bit: 1/0

Memory Location: 8bits = 1byte Registers 64bits = 8bytes