# put stock boot.img into /sdcard/boot.img
# get sha1
adb shell
su
SHA1=$(cat $(magisk --path)/.magisk/config | grep SHA1 | cut -d '=' -f 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
#!/usr/bin/env python | |
import base64 | |
import hashlib | |
import json | |
import logging | |
import random | |
import requests | |
import string | |
import uuid |
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
# usage: | |
# | |
# docker build -t ssi-extractor - < Dockerfile | |
# docker run -v ./www:/usr/local/apache2/htdocs/ -v ./out:/out ssi-extractor | |
FROM httpd:alpine | |
RUN apk update \ | |
&& apk add wget | |
RUN sed -i \ |
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
def encode_all(string): | |
''' | |
From https://gist.github.com/Paradoxis/6336c2eaea20a591dd36bb1f5e227da2 via https://stackoverflow.com/a/67629249/10660788 | |
>>> encode_all('<script>console.log("hello")</script>') | |
'%3c%73%63%72%69%70%74%3e%63%6f%6e%73%6f%6c%65%2e%6c%6f%67%28%22%68%65%6c%6c%6f%22%29%3c%2f%73%63%72%69%70%74%3e' | |
''' | |
return "".join("%{0:0>2}".format(format(ord(char), "x")) for char in string) | |
def escape_all(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
#!/bin/sh | |
CONF=/etc/config/qpkg.conf | |
QPKG_NAME="CACert" | |
#QPKG_ROOT=`/sbin/getcfg $QPKG_NAME Install_Path -f ${CONF}` | |
QPKG_ROOT=$(cd $(dirname ${0}); pwd) | |
QPKG_NAME1="QPerl" | |
QPKG_ROOT1=`/sbin/getcfg $QPKG_NAME1 Install_Path -f ${CONF}` | |
export QNAP_QPKG=$QPKG_NAME |
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 Zendesk Conversation Fixer | |
// @version 2 | |
// @grant none | |
// @match https://*.zendesk.com/agent/tickets/* | |
// ==/UserScript== | |
function fix(eventContainers) { | |
console.log("GreaseMonkey ZCF: fixing ..."); | |
const nContainers = eventContainers.length; |
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 python3 | |
import csv, ndjson, itertools, sys | |
r = ndjson.reader(sys.stdin) | |
r, rh = itertools.tee(r) | |
w = csv.DictWriter(sys.stdout, next(rh).keys()) | |
w.writeheader() | |
for d in r: | |
w.writerow(d) |
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
<?php | |
/** A simple echo page in PHP | |
* | |
* It just outputs the request it received back, including HTTP headers. | |
*/ | |
if (!function_exists('getallheaders')) { | |
// Polyfill for PHP<7.3 | |
function getallheaders() | |
{ |
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 | |
python3 -m venv .venv/wallabag_merge_tags | |
. .venv/wallabag_merge_tags/bin/activate | |
pip install -r requirements.txt | |
cat << EOF >&2 | |
*** Now run | |
. .venv/wallabag_merge_tags/bin/activate |
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
<?php | |
/** | |
* dial.php - A simplistic one-page protocol handler for tel: schemes. | |
* | |
* Copyright (C) 2020 Olivier Mehani <[email protected]> | |
* | |
* This renders a simple HTML form allowing to call a number, | |
* and to register itself as a protocol handler. | |
* | |
* Multiple devices are supported (see the `$devices` array), |
NewerOlder