Skip to content

Instantly share code, notes, and snippets.

View drizzt's full-sized avatar

Timothy Redaelli drizzt

View GitHub Profile
@drizzt
drizzt / main.py
Created January 16, 2024 20:31
PUT to POST proxy
#!/usr/bin/python3
import uvloop
uvloop.install()
from starlette.applications import Starlette
from starlette.responses import Response
from starlette.routing import Route
@drizzt
drizzt / main.py
Last active January 12, 2024 21:30
#!/usr/bin/python3
from starlette.applications import Starlette
from starlette.responses import Response
from starlette.routing import Route
import httpx
#!/bin/sh
export LC_ALL=C
get_top_of_version() {
ovs-vsctl get bridge "$1" protocol | sed -n 's/^.*"\([^"]*\)"]$/\1/p'
}
save_flows () {
for bridge; do
#!/usr/bin/env bash
set -euo pipefail
# Get last release from RELEASE-NOTES
LAST_RELEASE=$(curl -s https://raw.githubusercontent.com/spesmilo/electrum/master/RELEASE-NOTES | sed -n '1s/^# Release \(\S*\) .*$/\1/p')
if ! [[ -x electrum-"$LAST_RELEASE"-full-rbf-x86_64.AppImage ]]; then
TMPDIR=$(mktemp -d)
#!/bin/bash
set -euo pipefail
LEDGER_LIVE_DESKTOP_VERSION=${1:-1.0.2}
TMPDIR=$(mktemp -d)
trap 'rm -rf "$TMPDIR"' EXIT
@drizzt
drizzt / mac.c
Created March 16, 2011 15:07
Some useful C functions to manage mac addresses
/**
* @brief Some useful C functions to manage mac addresses
* @file
*/
#include <stdio.h>
#include <inttypes.h>
#include <limits.h>
/** Convert hex mac address to uint64_t
#!/bin/sh
###########################
# (C) 2021 Timothy Redaelli
# Based on work by:
# (C) 2017 Steven Black
###########################
#
# 2017-04-17 - 1.0.0 Initial release
# 2017-04-18 - 1.1.0 Improved modularization; added functionality for white & black lists
diff --git a/include/winbase.h b/include/winbase.h
index dc8aa081be4..16e1b06ef8c 100644
--- a/include/winbase.h
+++ b/include/winbase.h
@@ -1613,6 +1613,12 @@ typedef struct _WIN32_STREAM_ID {
} WIN32_STREAM_ID, *LPWIN32_STREAM_ID;
#include <poppack.h>
+/* Fix for GCC 10 */
+#define va_start(v,l) __builtin_va_start(v,l)
#!/usr/bin/python3
import json
import uuid
import lxml.html
import requests
def main():
"""
#!/bin/bash
set -euo pipefail
NANOVAULT_VERSION=${1:-1.2.1}
TMPDIR=$(mktemp -d)
trap 'rm -rf "$TMPDIR"' EXIT