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
// ==UserScript== | |
// @name douban_xiami | |
// @namespace org.kejun | |
// @include http://music.douban.com/* | |
// ==/UserScript== | |
//使用说明: | |
// 1. 安装本脚本到Greasemonkey | |
// 2. 到http://music.douban.com/recommended | |
// 3. 点击专辑封面会自动用虾米播放(如果窗口没弹出,检查是否被浏览器拦截) |
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
/* | |
Google+ Keyboard Shortcuts | |
Copyright (C) 2012 Jingqin Lynn | |
Includes jQuery | |
Copyright 2011, John Resig | |
Dual licensed under the MIT or GPL Version 2 licenses. | |
http://jquery.org/license | |
Includes Sizzle.js |
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
CCLOG("running scripts"); | |
//test2p | |
lua_State *L = pEngine->getLuaState(); | |
lua_getglobal(L, "test"); | |
lua_call(L, 0, 0); | |
lua_getglobal(L, "test1r"); | |
lua_call(L, 0, 1); | |
int ret = lua_tointeger(L, -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
/* | |
dependency_loader.user.js => Load everything needed in userscripts. | |
Copyright (C) 2012 Jingqin Lynn | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. | |
This program is distributed in the hope that it will be useful, |
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
#!/bin/sh | |
#create a new chain named SHADOWSOCKS | |
iptables -t nat -N SHADOWSOCKS | |
# Ignore your shadowsocks server's addresses | |
# It's very IMPORTANT, just be careful. | |
iptables -t nat -A SHADOWSOCKS -d 163.44.132.189/32 -j RETURN | |
iptables -t nat -A SHADOWSOCKS -d 0.0.0.0/8 -j RETURN |
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
ImageView imageView = (ImageView) findViewById(R.id.card_thumbnail_image); | |
Bitmap mBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.rose); | |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP){ | |
//Default | |
imageView.setBackgroundResource(R.drawable.rose); | |
} else { | |
//RoundCorners | |
RoundCornersDrawable round = new RoundCornersDrawable(mBitmap, | |
getResources().getDimension(R.dimen.cardview_default_radius), 0); //or your custom radius |
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/perl | |
use strict; | |
use warnings; | |
use utf8; | |
use open ":encoding(utf8)",":std"; | |
open my $infh, "<:encoding(utf8)", "zh.dat" or die $!; | |
while (<$infh>) { |
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
# take one | |
# subdirectory (one server, multiple services) | |
location /btsync/ { | |
rewrite ^/btsync/gui(.*) /btsync$1 last; | |
proxy_pass http://127.0.0.1:8888/gui/; | |
proxy_redirect /gui/ /btsync/; | |
proxy_buffering off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; |
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
//wearversion | |
//wearlog | |
//wearvoiceinputenable | |
//wearvoiceinputdisable | |
//weargoogleapi | |
//assert | |
//pushassert | |
//uplog | |
//upcrash | |
//switchnotificationstatus |
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
# luna_pinyin.custom.yaml | |
# | |
# 在【朙月拼音】裏使用Emoji表情(這份配置已過時,新的emoji實現代碼在 https://github.com/rime/rime-emoji ) | |
# | |
# 保存到Rime用戶文件夾後,重新部署生效 | |
# ~/.config/ibus/rime (linux) | |
# ~/Library/Rime (macos) | |
# %APPDATA%\Rime (windows) | |
# | |
# 如果目標文件已經包含其他修改內容,只需按照縮進合併 patch: 以下的部分 |
OlderNewer