Skip to content

Instantly share code, notes, and snippets.

@Benau
Benau / tgs2gif.c
Created July 30, 2021 06:41
tgs2gif
// gcc tgs2gif.c -o tgs2gif -lrlottie -O3 -lz `MagickWand-config --cppflags --cxxflags --ldflags --libs`
#include <rlottie_capi.h>
#include <MagickWand/MagickWand.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <zlib.h>
// Size of the block of memory to use for reading
#define LENGTH 0x1000
@Benau
Benau / proton.py
Last active December 27, 2020 07:25
proton vpn
#!/usr/bin/env python3
import json
import urllib
import urllib.request
import ipaddress
import socket
import dns.resolver
# pip install dnspython
url_data = urllib.request.urlopen('https://api.protonmail.ch/vpn/logicals')
@Benau
Benau / ipv6_sql.c
Created October 25, 2019 03:17
ipv6 sqlite extension
#include "sqlite3ext.h"
#include <stdlib.h>
#include <string.h>
#include <arpa/inet.h>
// gcc -fPIC -shared ipv6_sql.c -g -o libipv6.so
SQLITE_EXTENSION_INIT1
static void andIPv6(struct in6_addr* ipv6, const struct in6_addr* mask)
{
@Benau
Benau / main.cpp
Created October 8, 2018 18:09
replace main.cpp in stk-editor for universal mesh file to obj
#include <irrlicht.h>
#include <string>
#include <iostream>
#include "../lib/irrlicht/source/Irrlicht/COBJMeshWriter.h"
#include "spm/sp_mesh_loader.hpp"
int main(int argc, char* argv[])
{
if (argc != 2)
{
@Benau
Benau / patch
Created April 18, 2017 02:19
ST recorder
diff --git a/src/supertux/screen_manager.cpp b/src/supertux/screen_manager.cpp
index 3cf95d8..6ed59c7 100644
--- a/src/supertux/screen_manager.cpp
+++ b/src/supertux/screen_manager.cpp
@@ -44,6 +44,8 @@
#include <stdio.h>
+#include <openglrecorder.h>
+