This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local obj={} | |
obj.__index = obj | |
obj.name = "Windows" | |
obj.version = "1.0" | |
obj.author = "blindFS" | |
-- Internal function used to find our location, so we know where to load files from | |
local function script_path() | |
local str = debug.getinfo(2, "S").source:sub(2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function openWithSafari(arg) | |
hs.osascript.applescript('tell window ' .. arg[1] .. ' of application "Safari"\nset current tab to tab ' .. arg[2] .. '\nactivate\nend tell') | |
end | |
local function openWithChrome(arg) | |
hs.osascript.applescript('tell application "Google Chrome"\nrepeat with win in windows\nif id of win = ' .. arg[1] .. ' then\nset active tab index of win to ' .. arg[2] .. '\nset index of win to 1\nend if\nend repeat\ndelay 0.1\ndo shell script "open -a Google\\\\ Chrome"\nend tell') | |
end | |
-- hs_btabs.lua | |
local function browserTabsRequest() | |
local safari_running = hs.application.applicationsForBundleID("com.apple.Safari") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ACTION=="add", ATTRS{idVendor}=="0f39", ATTRS{idProduct}=="0611", OWNER="farseer", RUN+="/home/farseer/bin/auto_xmodmap" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Processor Information: | |
Vendor: GenuineIntel | |
CPU Family: 0x6 | |
CPU Model: 0x2a | |
CPU Stepping: 0x7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
command! Wiki2Org :call Allwiki2Org() | |
function! Wiki2Org() | |
let b:enter_block = 0 | |
let b:ordered_index = {} | |
let total_line = line("$") | |
for lino in range(1, total_line) | |
let line_content = getline(lino) | |
if line_content =~ '^[\t ]*{{{class=.\w*.' | |
let b:enter_block = 1 | |
execute lino.'s/^[\t ]*{{{class=.\(\w*\)./#+begin_src \1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% xetex/xelatex 字体设定宏包 | |
\ProvidesPackage{zhfontcfg} | |
\usepackage[utf8]{inputenc} | |
\usepackage{fontspec,xunicode} | |
\usepackage[slantfont, boldfont, CJKspace, CJKmath]{xeCJK} % 允许斜体和粗体 | |
\setCJKmainfont{WenQuanYi Micro Hei} % 设置缺省中文字体 | |
\setCJKmonofont{WenQuanYi Micro Hei Mono} % 设置等宽字体 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Desktop Entry] | |
Name=Emacs | |
GenericName=Text Editor | |
Comment=Edit text | |
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++; | |
Exec=env LC_CTYPE=zh_CN.UTF-8 emacs %F | |
Icon=emacs | |
Type=Application | |
Terminal=false | |
Categories=Development;TextEditor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
count = 0 | |
def merge_sort(li): | |
if len(li) < 2: | |
return li | |
m = len(li) / 2 | |
return merge(merge_sort(li[:m]), merge_sort(li[m:])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import url(http://fonts.googleapis.com/css?family=Inconsolata); | |
@import url(http://fonts.googleapis.com/css?family=PT+Sans); | |
@import url(http://fonts.googleapis.com/css?family=PT+Sans+Narrow:400,700); | |
article, | |
aside, | |
details, | |
figcaption, | |
figure, | |
footer, | |
header, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\usepackage{fontspec} | |
\setmainfont{Arial} | |
\usepackage{xeCJK} | |
\setCJKmainfont{SimHei} | |
\usepackage[english]{babel} % English language/hyphenation | |
\usepackage{amsmath,amsfonts,amsthm} % Math packages | |
\usepackage{graphicx} | |
\usepackage{tikz} | |
\usepackage{url} |
NewerOlder