View script-template.sh
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 bash | |
set -Eeuo pipefail | |
trap cleanup SIGINT SIGTERM ERR EXIT | |
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
usage() { | |
cat <<EOF | |
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
View sp.sh
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/bash | |
client_id= | |
client_secret= | |
port=8888 | |
redirect_uri=http%3A%2F%2Flocalhost%3A$port%2Fcallback | |
auth_endpoint=https://accounts.spotify.com/authorize/?response_type=code\&client_id=$client_id\&redirect_uri=$redirect_uri | |
tmp_code=/tmp/.sp_code | |
View userChrome.css
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
html#main-window { | |
--color-bg: #1e1f29; | |
--toolbar-bgcolor: var(--color-bg) !important; | |
--gap-between-tabs: 0px; | |
--margin-after-tab-list: 8x; | |
--margin-before-tab-list: 8px; | |
--tab-height: 32px; | |
--tab-icon: 16px; | |
--tabs-container-height: 85px; |
View panda.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
#!/usr/bin/env node | |
"use strict" | |
const exec = require('child_process').spawn; | |
const http = require('http'); | |
const vm = require('vm'); | |
const rl = require('readline'); | |
console.log('=== I 💓 panda ==\n'); |
View push.sh
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/bash | |
dir=$(dirname $0) | |
package=com.package.app | |
remote=/data/data/$package/cache/your_path/ | |
webcache=/data/data/$package/app_webview/ | |
cd $dir | |
adb shell am force-stop $package |
View mailclear.scpt
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
-- ref: http://daringfireball.net/2007/07/simplgge_inbox_sweeper | |
-- gist: https://gist.github.com/gruber/1063605 | |
set _desc to "archive all readed msg at inbox; then mark other msg as read" | |
tell application "Mail" | |
set _archive_box to mailbox "Archive" | |
set _msgs_to_move to (a reference to ¬ | |
(every message of inbox ¬ |
View wakeup-script-example
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/bash | |
# $ brew install sleepwatcher | |
# $ launchctl load ~/Library/LaunchAgents/de.bernhard-baehr.sleepwatcher-20compatibility-localuser.plist | |
# move this script to $HOME/.wakeup | |
SSID=$(/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport -I\ | |
| grep ' SSID:' | cut -d ':' -f 2 | tr -d ' ') | |
home_ssid='YOURHOME_SSID' |
View sogoke.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
//source: http://www.sogoke.com/static/cache/js/35771f476692.js | |
a("." + d.inputClass).keydown(function(u) { | |
a("#" + d.tooManyInputsID).hide(); | |
a("#" + d.inputWrongID).hide(); | |
h = a(this).val(); | |
p = g(j); | |
// 回车停止事件没有处理tag | |
if (u.keyCode === 13) { |
View keymap
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
keymap f LIST_MENU | |
keymap d CLOSE_TAB | |
#keymap t TAB_LINK | |
keymap t TAB_GOTO | |
keymap gT PREV_TAB | |
keymap gt NEXT_TAB | |
keymap gg BEGIN | |
keymap C-f NEXT_PAGE |
View sf.blog.css
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
/** | |
[preview](http://minus.com/i/7myP2XHfeHXv.png) | |
*/ | |
.layout-main { | |
width: 100%; | |
} | |
.layout-secondary { | |
display: none; | |
} |
NewerOlder