Skip to content

Instantly share code, notes, and snippets.

View Q-Search_All_in_one.conf
# 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
View pushbullet_bookmarklet.js
void(window.open('http://pushbullet.com/push/link?title='+encodeURIComponent(document.title)+'&url='+encodeURIComponent(location.href)+'&device_iden=[Your Device ID]'))
View Boxstarter
cinst Switcheroo
cinst Ditto
cinst Listary
View german_str2array.php
<?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);
View .vromerc
""" .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>
View strtotime.php
<?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',
View alias_for_sublimeText
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 Oct 14, 2014
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"
View adblock_for_ios.js
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 Aug 29, 2015
直接在_MAPPING_TABLE 加入“键”\tab”值“即可。谷歌中文输入法的词组导出后为dis文件后,记事本打开直接复制到_MAPPING_TABLE就可用了。当然也可把这个扩展放到dropbox里,可以随时编辑随时同步。我在谷歌拼音的自定义词虽然时时同步,但是丢了不少!还是拽在自己手里安心。
View Google_IME.lua
-- 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 Aug 29, 2015
Note of Math For Programmers
View Note_of_Math_For_Programmers.md

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