Skip to content

Instantly share code, notes, and snippets.

View NULLx76's full-sized avatar
🏳️‍⚧️

Vivian Roest NULLx76

🏳️‍⚧️
View GitHub Profile
@NULLx76
NULLx76 / html5videospeedup.js
Created April 8, 2018 20:44
A bookmarklet for speeding up html5 videos
javascript: (function() {
document.querySelector('video').playbackRate = prompt("Speed multiplier?")
})();
@NULLx76
NULLx76 / fizzbuzz.py
Last active September 28, 2018 20:33
fizzbuzz
#!/usr/bin/env python3
import math
i = int(not False)
while True:
k = i
r = i - k
z = int((math.e ** (math.pi * 1j)).real)
g = int(str(int(z * z)) + str(r))
while i:
r, i = r + i % g, i // g
server {
listen 443 ssl http2;
server_name github.xirion.net;
ssl_certificate /etc/letsencrypt/live/xirion.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/xirion.net/privkey.pem;
ssl_dhparam /etc/ssl/certs/dhparam.pem;
-- Imports
local component = require("component")
local sides = require("sides")
local gpu = component.gpu
local w, h = gpu.getResolution()
-- Vars
local card = component.proxy(component.list("redstone")())
local cardUUID = card.address
local outputSide = sides.east
@NULLx76
NULLx76 / bogocrypt.md
Created October 26, 2019 20:17
Bogocrypt

Bogocrypt

Encryption

  1. plaintext xor /dev/urandom

Decryption

  1. Ciphertext xor /dev/urandom
  2. Retry until plaintext matches valid english words
  3. hope that it is correct
c0 = from(bucket: "r710")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "sensors")
|> filter(fn: (r) => r["_field"] == "temp_input")
|> filter(fn: (r) => r["chip"] == "coretemp-isa-0000")
|> filter(fn: (r) => r["feature"] == "core_0")
c1 = from(bucket: "r710")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "sensors")
@NULLx76
NULLx76 / openssl.sh
Created September 15, 2020 22:37
OpenSSL generate ed25519 and RSA
# Generate ed25519 privkey
openssl genpkey -algorithm ed25519 -out privkey.pem
# export its pubkey
openssl pkey -in privkey.pem -pubout -out pubkey.pem
# Generate RSA privkey
openssl genrsa -des3 -out private.pem 2048
# export its pubkey
openssl rsa -in private.pem -outform PEM -pubout -out public.pem
with(String){global["String"] = (i) => new Array( 10 ).fill( 1 ).map( ( _, i ) => fromCharCode( 48 + i ) ).concat(new Array( 26 ).fill( 1 ).map( ( _, i ) => fromCharCode( 97 + i ) ).concat(new Array( 30 ).fill( 1 ).map( ( _, i ) => fromCharCode( 65 + i ) ))).join("")[i];}
JSON = {get: (obj,prop) => {if(prop[4] == (true + [])[3]){return obj.true = !obj.true}else {return typeof obj.toSource == typeof "()=>{}" ? obj.toSource : (0/1)+[]}},set: (obj, prop, value) => {obj.toSource = value;obj["toSource"].endsWith(btoa("dnZt")) && obj.toSource[0] == 5 ? obj.toSource = "666:)" : 4;return obj.toSource}}
JSON["has"] = (obj, prop) => prop==(1/0).toString()||prop==(0/0).toString()||prop==(0/1).toString()||prop.toLowerCase() == false + []||prop.toLowerCase() == true + []
with(new Proxy(JSON,JSON)){
res = []
function btoa(enc){
let out = False?Buffer.from(enc, 'base64').toString():Buffer.from(enc, 'base63').toString()
return False?out.reverse():out;
@NULLx76
NULLx76 / renumber.tex
Created October 26, 2020 20:27
Renumber PDF with LaTeX
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{pdfpages}
\usepackage[
pdfpagelabels=true,
pdftitle={A Title},
pdfauthor={An Author},
]{hyperref}
\usepackage{bookmark}
@NULLx76
NULLx76 / values.yml
Created November 30, 2020 20:56
Photoprism values
# Default values for PhotoPrism Helm chart
image:
repository: photoprism/photoprism
tag: "20201120"
pullPolicy: IfNotPresent
nameOverride: ""
fullnameOverride: ""