Skip to content

Instantly share code, notes, and snippets.

<?php
function pre_print_r($var){
echo "<pre>";
print_r($var);
echo "</pre>";
}
class Obj1 {
public function __call($method,$arg){
return $this; }}
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);
<?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 / 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

<?php
$volcabulary =array (
0 => 'Handelsfreiheit',
1 => 'Handel (Händler)',
2 => 'Handel, auswärtiger',
3 => 'Handelsbilanz',
4 => 'Handelskapital',
5 => 'Zweck',
6 => 'Zyklus, industrieller',