Skip to content

Instantly share code, notes, and snippets.

@mysteriouss
mysteriouss / google.cleaner.js
Created June 13, 2022 19:00
Google Search Cleaner
// ==UserScript==
// @name Google
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.google.com/search*
// @icon https://www.google.com/s2/favicons?domain=google.com
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js
// @grant none
@mysteriouss
mysteriouss / overlay.sh
Created February 24, 2022 08:52
docker container overlay
#!/bin/sh
# grab the size and path to the largest overlay dir
du /var/lib/docker/overlay2 -h | sort -h | tail -n 100 | grep -vE "overlay2$" > /tmp/large-overlay.txt
# make sure json parser is installed
# yum install -y jq
# apt-get install jq -y
@mysteriouss
mysteriouss / downloader.php
Created November 22, 2021 08:21
weibo video downloader
<?php
date_default_timezone_set('Asia/Shanghai');
if(!isset($argv)){
echo 'Usage: php downloader.php $url' . PHP_EOL;
return;
}
$dir = __DIR__ ;
$ua = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.3 Safari/605.1.15';
@mysteriouss
mysteriouss / key-remap.md
Last active December 7, 2023 18:58
M1 MacBook Air F5 & F6 KeyRemap
#!/bin/sh

## xref: https://www.reddit.com/r/MacOS/comments/jy5ry8/m1_macbook_air_keysshortcut_for_keyboard/ghryk3j/?utm_source=reddit&utm_medium=web2x&context=3

cat > ~/Library/LaunchAgents/com.local.KeyRemapping.plist << EOF
<?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>
// ==UserScript==
// @name V2EXcellent.js-Extra
// @namespace none
// @version 1.0.0
// @description A Better V2EX - Extra
// @author mysteri0uss
// @match *://*.v2ex.com/*
// @require //code.jquery.com/jquery-1.12.4.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/markdown-it/8.4.2/markdown-it.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/highlight.min.js
@mysteriouss
mysteriouss / netease-qq.php
Last active July 8, 2020 21:23
netease music -> qq
deprecated
@mysteriouss
mysteriouss / netease.php
Last active July 8, 2020 21:22
netease music
deprecated
@mysteriouss
mysteriouss / weixin_tiaotiao.js
Created January 1, 2018 07:49
weixin_tiaotiao
// ==UserScript==
// @name weixin_tiaotiao
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://mp.weixin.qq.com/
// @grant GM_xmlhttpRequest
// @require https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.9-1/crypto-js.js
// @require https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.9-1/aes.js
@mysteriouss
mysteriouss / douyu.js
Last active September 29, 2017 02:21
// ==UserScript==
// @name douyu.com
// @namespace http://tampermonkey.net/
// @version 1.0
// @description try to take over the world!
// @author You
// @match *://www.douyu.com/*
// @grant GM_xmlhttpRequest
// ==/UserScript==
function string62to10(number_code) {
number_code = String(number_code)
var chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',
radix = chars.length,
len = number_code.length,
i = 0,
origin_number = 0
while (i < len) {
origin_number += Math.pow(radix, i++) * chars.indexOf(number_code.charAt(len - i) || 0)
}