{
"username": "test",
"password": "test
}
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 | |
for FILE in "$@" | |
do | |
echo $FILE | |
NAME=$(basename "$FILE" | cut -d . -f1) | |
PAGES=`pdfinfo "$FILE" | grep Pages | grep -P '\d+' -o` | |
mkdir -p "$NAME" | |
seq 1 $PAGES | parallel pdftoppm -f {} -l {} -aa yes -r 400 -png "$(printf "%q" "$FILE")" "$(printf "%q/img" "$NAME")" | |
find $NAME -type f -name "*.png" | parallel optipng -o4 {} |
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
/** | |
* Full documentation for the "identitytoolkit" API can be found here: | |
* https://cloud.google.com/identity-platform/docs/reference/rest/v1/accounts | |
*/ | |
/** | |
* Settings object for an IDP(Identity Provider). | |
* @typedef {Object} ProviderOptions | |
* @property {string} options.name The name of the provider in lowercase. | |
* @property {string} [options.scope] The scopes for the IDP, this is optional and defaults to "openid email". |
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
(async () => { | |
let u = new URL(location.href); | |
let mc = u.pathname.match(/detail\/mc(\d+)/); | |
if (mc.length != 2) { | |
return | |
} | |
let mcid = mc[1]; | |
let r = await fetch("https://manga.bilibili.com/twirp/comic.v1.Comic/ComicDetail?device=pc&platform=web", { | |
"headers": { |
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 Exhentai Preview Image | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://exhentai.org/* | |
// @grant none | |
// ==/UserScript== |
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
#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby | |
# This script installs to /usr/local only. To install elsewhere you can just | |
# untar https://github.com/Homebrew/brew/tarball/master anywhere you like or | |
# change the value of HOMEBREW_PREFIX. | |
HOMEBREW_PREFIX = "/usr/local".freeze | |
HOMEBREW_REPOSITORY = "/usr/local/Homebrew".freeze | |
HOMEBREW_CACHE = "#{ENV["HOME"]}/Library/Caches/Homebrew".freeze | |
HOMEBREW_OLD_CACHE = "/Library/Caches/Homebrew".freeze | |
BREW_REPO = "https://mirrors.ustc.edu.cn/brew".freeze | |
CORE_TAP_REPO = "https://mirrors.ustc.edu.cn/homebrew-core".freeze |
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
#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby | |
# This script installs to /usr/local only. To install elsewhere you can just | |
# untar https://github.com/Homebrew/brew/tarball/master anywhere you like or | |
# change the value of HOMEBREW_PREFIX. | |
HOMEBREW_PREFIX = "/usr/local".freeze | |
HOMEBREW_REPOSITORY = "/usr/local/Homebrew".freeze | |
HOMEBREW_CACHE = "#{ENV["HOME"]}/Library/Caches/Homebrew".freeze | |
HOMEBREW_OLD_CACHE = "/Library/Caches/Homebrew".freeze | |
BREW_REPO = "https://mirrors.ustc.edu.cn/brew".freeze | |
CORE_TAP_REPO = "https://mirrors.ustc.edu.cn/homebrew-core".freeze |
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
{ | |
"extends": [ | |
"airbnb" | |
], | |
"env": { | |
"browser": true | |
}, | |
"parser": "babel-eslint", | |
"rules": { | |
"indent": ["error", 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
curl http://blog.monstuff.com/ad-block-pac.js | \ | |
grep dnsDomainIs | \ | |
grep -v '//' | \ | |
grep -v 'function' | \ | |
awk -F '[""]' '{print $2}' | \ | |
awk '$1 ~ /^\./ {printf "DOMAIN-SUFFIX,%s,ADBLOCK\n",substr($1,2)} $1 !~ /^\./ {printf "DOMAIN,%s,ADBLOCK\n",$1}' \ | |
> adblock.txt |
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 | |
sudo apt-get update && sudo apt-get install apt-transport-https ca-certificates | |
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
LSB_RELEASE=`lsb_release -c | cut -c 11-16` | |
KERNEL_VERSION=`uname -r | cut -f1,2 -d"-"` | |
echo "deb https://apt.dockerproject.org/repo ubuntu-$LSB_RELEASE main" | sudo tee /etc/apt/sources.list.d/docker.list |
NewerOlder