Skip to content

Instantly share code, notes, and snippets.

View ITJesse's full-sized avatar
😺

Jesse Zhu ITJesse

😺
View GitHub Profile
#!/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 {}
/**
* 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".
@ITJesse
ITJesse / 漫读券.js
Last active November 14, 2022 17:38 — forked from xmdhs/漫读券.js
批量使用漫读券
(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": {
@ITJesse
ITJesse / main.js
Last active May 8, 2019 12:52
Exhentai Preview Image
// ==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==
#!/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
#!/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
@ITJesse
ITJesse / API.md
Created April 2, 2018 09:12
Wechat Bot API

登陆接口

Request

{
	"username": "test",
	"password": "test
}
@ITJesse
ITJesse / tmp
Created February 15, 2018 06:29
{
"extends": [
"airbnb"
],
"env": {
"browser": true
},
"parser": "babel-eslint",
"rules": {
"indent": ["error", 2],
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
#!/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