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 | |
DATA_PATH=${DATA_PATH:-$2} | |
if [ -z "$DATA_PATH" ]; then | |
sshfs -h | |
exit 1 | |
fi | |
LOCK_PATH=$DATA_PATH/.lock-$RANDOM |
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
if application "Telegram Desktop" is running then | |
tell application "Telegram Desktop" | |
quit | |
end tell | |
delay 3 | |
tell application "Telegram Desktop" | |
launch | |
end tell | |
end if |
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 | |
let fs = require('fs') | |
let { argv } = require('process') | |
let res_map = fs.readFileSync('R.map').toString().split('\n').slice(0,-1).map(v => v.slice(0,-1).split(' = ')).reduce((dict, v) => { | |
dict[v[1]] = v[0] | |
return dict | |
}, {}) |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"\> | |
<plist version="1.0"> | |
<dict> | |
<key>KeepAlive</key> | |
<true/> | |
<key>RunAtLoad</key> | |
<true/> | |
<key>Label</key> | |
<string>homebrew.mxcl.aria2</string> |
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
########### | |
# General # | |
########### | |
dir=${HOME}/Downloads | |
# allow-overwrite=true | |
# disable-ipv6=true | |
# quiet=true |
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 | |
import argparse | |
import md5 | |
from base64 import urlsafe_b64encode as b64enc | |
parser = argparse.ArgumentParser(description='convert fid to audio file url') | |
parser.add_argument('fid', action='store', help='fid') | |
args = parser.parse_args() |
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 | |
GENERATOR="/^application-icon-(\\d+):(.*)/ && print \"unzip -o $1 \$2 && mv \$2 $(basename $1 .apk)-\$1.png\n\"" | |
aapt d --values badging $1 | perl -n -e"$GENERATOR" | sh | |
rm -rf res/ |
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
package moe.banana.jsonapi2; | |
import com.squareup.moshi.JsonAdapter; | |
import com.squareup.moshi.Moshi; | |
import com.squareup.moshi.Types; | |
import java.io.IOException; | |
import java.lang.annotation.Annotation; | |
import java.lang.reflect.Array; | |
import java.lang.reflect.ParameterizedType; |
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
# utility | |
logfile = None | |
def debug(*objects): | |
print(*objects) | |
if logfile: | |
print(*objects, file=logfile, flush=True) | |
def format_hex(bs, delim=''): |
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
@font-face { | |
font-family: "Kagami Serif"; | |
src: local("Liberation Serif"), | |
local("Times New Roman"), | |
local("Times"); | |
} | |
@font-face { | |
font-family: "Kagami Songti SC"; | |
src: local("Songti SC Regular"), local(STSongti-SC-Regular), // OS X 10.8 |