Skip to content

Instantly share code, notes, and snippets.

View KokaKiwi's full-sized avatar
🥝
rolling

KokaKiwi KokaKiwi

🥝
rolling
View GitHub Profile
@LilithL
LilithL / index.html
Last active April 24, 2020 19:15
Generateur qr code d'attestations de sortie (version du 24/04/2020)
<!DOCTYPE html>
<head>
<title>Generateur qr code d'attestation de sortie</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no" />
<script src="qrious.js"></script>
</head>
<body>
<form id="form-profile" accept-charset="UTF-8">
<h2>Remplissez en ligne votre attestation numérique :</h2>
@alexreg
alexreg / cargo-update-binaries.py
Created August 15, 2018 23:28
Script for updating Rust binaries via Cargo
#!/usr/bin/env python3
import io
import json
from packaging import version
import re
import subprocess
def get_crate_info(crate):
with subprocess.Popen(["cargo", "info", "--json", crate], stdout = subprocess.PIPE) as proc:
@0xa
0xa / followings.py
Last active July 27, 2022 13:28
Mastodon followings management
#!/usr/bin/env python3
"""
A script that go through your followings and unfollows dead accounts.
It notices empty accounts, accounts that were deleted locally and remotely,
and also cleans up dead instances if allowed to.
It has a cache so you can run it once without --unfollow to preview its
actions, and a second time that will skip all verified active profiles.
With colors and a nice progress bar with item count, %, and ETA.
#!/usr/bin/env python3
"""
ROBCO Industries (TM) Password Recovery Tool
----
Next-generation hacking assistant for your RobCo Pip-Boy 3000.
> Words: seven peace broke small steal agree deity armed store empty codes brink
>
> try: peace (6 matches)
#!/bin/bash
modprobe -r ec_sys
modprobe ec_sys write_support=1
on="\x8a"
off="\x0a"
led(){
echo -n -e $1 | dd of="/sys/kernel/debug/ec/ec0/io" bs=1 seek=12 count=1 conv=notrunc 2> /dev/null
@kmonsoor
kmonsoor / RPi-install-wifi.sh
Last active February 19, 2024 05:46
install wifi adapter drivers on Raspberry Pi; origin: http://www.fars-robotics.net/install-wifi
#!/bin/bash
#set -e
# origin-source: http://www.fars-robotics.net/install-wifi
# install-wifi - v9.4 - by MrEngman.
# After downloading this script:
# $ sudo mv ./install-wifi /usr/bin/install-wifi
# $ sudo chmod +x /usr/bin/install-wifi
# $ sudo install-wifi -h
#
anonymous
anonymous / gadt_avl.ml
Created September 25, 2015 22:46
GADT enforced AVL tree
(* fuck license, fuck all copyrights, fuck this society *)
type compare = LessThan | Equal | GreaterThan
module RawAVLTree = struct
type z = Z : z
type 'n s = S : 'n -> 'n s
(* Depths of branches of a AVL tree node differs at most by 1 *)
@mfuerstenau
mfuerstenau / zigzag-encoding.README
Last active February 22, 2024 03:40
ZigZag encoding/decoding explained
ZigZag-Encoding
---------------
Maps negative values to positive values while going back and
forth (0 = 0, -1 = 1, 1 = 2, -2 = 3, 2 = 4, -3 = 5, 3 = 6 ...)
(i >> bitlength-1) ^ (i << 1)
with "i" being the number to be encoded, "^" being
XOR-operation and ">>" would be arithemtic shifting-operation
@paulirish
paulirish / bling.js
Last active May 1, 2024 19:56
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
> % rustc hello.rs --target=psp -lpspdebug -lpspdisplay -lpspge -lm -lc -lpspuser -lgcc
> % psp-fixup-imports hello && psp-prxgen hello hello.prx