Skip to content

Instantly share code, notes, and snippets.

NemoAlex

Block or report user

Report or block NemoAlex

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@NemoAlex
NemoAlex / frpc
Created Aug 20, 2018
/etc/init.d/frpc on OpenWrt
View frpc
#!/bin/sh /etc/rc.common
START=99
USE_PROCD=1
start_service() {
procd_open_instance "frpc"
procd_set_param command /root/frp/frpc -c /root/frp/frpc.ini
procd_set_param stdout 1
procd_set_param stderr 1
View gist:31a086825eeec610ce80
javascript:(function(){open('https://chart.googleapis.com/chart?chs=150x150&cht=qr&choe=UTF-8&chl='+encodeURIComponent(document.location.href));})()
View uri.js
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@NemoAlex
NemoAlex / gist:8144724
Created Dec 27, 2013
复制到 Alfred,可以用 “dict [单词]” 搜索必应词典
View gist:8144724
alfred://customsearch/Search%20%7Bquery%7D%20in%20%E5%BF%85%E5%BA%94%E8%AF%8D%E5%85%B8/dict/utf8/noplus/http://cn.bing.com/dict/search?q={query}
@NemoAlex
NemoAlex / gist:3551983
Created Aug 31, 2012
Set MplayerX - SeekStepTime
View gist:3551983
# Using Terminal set MplayerX SeekStep to 8s.
cd ~/Library/Preferences/
defaults write org.niltsh.MPlayerX SeekStepTimeR 8
defaults write org.niltsh.MPlayerX SeekStepTimeL 8
# Then restart MplayerX.app if it is running.
@NemoAlex
NemoAlex / gist:2879405
Created Jun 6, 2012
Squirrel 配色方案修改
View gist:2879405
更新:建议编辑 ~/Library/Rime/squirrel.custom.yaml 文件,而不要在 squirrel.yaml 上做改动
新版本加入了对边距宽高的订制,感谢作者
patch:
us_keyboard_layout: true
style/horizontal: false
style/font_face: "Helvetica Neue"
style/font_point: 21
style/corner_radius: 4
style/border_height: 4
@NemoAlex
NemoAlex / gist:2316620
Created Apr 6, 2012
在 Rime 中加入"["和"]"翻页按键绑定
View gist:2316620
# default.custom.yaml
# save it to:
# ~/.ibus/rime (linux)
# ~/Library/Rime (macos)
# %APPDATA%\Rime (windows)
patch:
key_binder:
bindings:
- accept: "Control+p"
View Detective.html
<!DOCTYPE html>
<html>
<header>
<title>File Detective</title>
</header>
<body>
<h1>File Detective</h1>
<p>
<a href="javascript:(function(){function getFileType(a) { a = a.split('.'); if (a.length == 1) return false; if (~a[a.length - 1].indexOf('/')) return false; return a[a.length - 1] } for (var fileList = [], els = document.getElementsByTagName('a'), i = 0; els[i]; i++) getFileType(els[i].href) && fileList.push('\'' + els[i].href + '\''); var ta = document.createElement('textarea'); ta.setAttribute('onclick', 'this.select()'); ta.setAttribute('style', 'width:100%'); ta.setAttribute('rows', fileList.length); ta.innerHTML = fileList.join(' '); document.body.appendChild(ta);})()">Detective</a>
</p>
You can’t perform that action at this time.