# 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
// ==UserScript== | |
// @name GitHub BMO Linker | |
// @version 2 | |
// @author Olivier Mehani <[email protected]> | |
// @downloadURL https://gist.github.com/shtrom/e9c25e103aaf2f8ede6f740787b50e33 | |
// @grant none | |
// @match https://github.com/* | |
// @run-at document-idle | |
// ==/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
#!/bin/bash -u | |
# Bash script to post a local HTML file to a Wallabag instance | |
# | |
# This assumes client and user credentials are in a pass(1) entry formatted as | |
# follows: | |
# | |
# <PASSWORD> | |
# login: <USERNAME> | |
# client_id: <CLIENT_ID> | |
# client_secret: <CLIENT_SECRET> |
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() | |
{ |
NewerOlder