Skip to content

Instantly share code, notes, and snippets.

@riptl
riptl / hconv.py
Created September 3, 2017 13:27
Python 2 hex converter for OSdev
#!/usr/bin/python
# Python 2 format converter
from __future__ import division
import sys
sizes = {
'bit': 0.125,
@riptl
riptl / gwan.md
Created January 18, 2018 15:42
G-WAN copypasterino

The authors keep changing my comment to “I love G-WAN” in an attempt to scam people, so I am saving this here

Let the fun begin. Edit my comment!

G-WAN is clearly proven as snakeoil software. It is advertised as a web server but in fact it is only software specifically written to look good on benchmarks. Any real web server load that is not ~200B in size seems to crash the server or just shows abysmal performance.

More on that later. Sources supporting my arguments may be found at the bottom of this..

@riptl
riptl / ringbuf.c
Created March 1, 2018 14:02
C Unmasked Ring Buffer
#include <stdlib.h>
#include <string.h>
#include "ringbuf.h"
// Unmasked implementation
inline static size_t unmasked_inc(size_t index, size_t size);
inline static size_t unmasked_inc(size_t index, size_t size)
@riptl
riptl / sdlwrappers.cc
Created March 26, 2018 14:37
Mediocre SDL C++ Wrappers
#include "sdlwrappers.h"
#include <SDL2/SDL.h>
#define CHECK_OBJ {if (obj == nullptr) throw std::string(SDL_GetError());}
using namespace sdl;
Context::Context()
{
@riptl
riptl / Grid.pde
Last active April 3, 2018 21:05
Grid Engine for Processing
import java.util.Stack;
// v1
boolean gboxDebug;
class Grid {
// x,y: middle (1 = part), z: distance
final PVector pos;
final int screenFit;
@riptl
riptl / byteslicer.go
Created May 20, 2018 19:14
deserialize byte slices
package bufferutils
import "encoding/binary"
var bin = binary.BigEndian
type ByteSlicer struct {
Buf []byte
Ptr int
}
@riptl
riptl / rip_arm.py
Created July 26, 2018 04:45
download ARM PDFs
#!/usr/bin/env python3
# by terorie, 2018
# sorry ARM
import os
import requests
import lxml.html
import shutil
DUMP_DIR = 'armpdf'
@riptl
riptl / keybase.md
Last active September 29, 2018 19:43
keybase.io verification
{
  "body": {
    "key": {
      "eldest_kid": "01203138ce4b55f668614a28ffb222aab364e44de94f98af9448e2d453c2ba9241d30a",
      "host": "keybase.io",
      "kid": "01203138ce4b55f668614a28ffb222aab364e44de94f98af9448e2d453c2ba9241d30a",
@riptl
riptl / rtorrent_xmlrpc.txt
Created October 18, 2018 13:55
rtorrent XMLRPC methods
system.listMethods
system.methodExist
system.methodHelp
system.methodSignature
system.multicall
system.shutdown
system.capabilities
system.getCapabilities
add_peer
and
@riptl
riptl / nimiq_measure.html
Last active February 26, 2019 00:04
Nimiq Words Measurement for address naming concept
<html>
<head>
<title>Nimiq Word Width Measurement</title>
<style>
@font-face {
font-family: 'Muli SemiBold';
src: url("http://ftb.terorie.com/muli-semibold.woff2");
}
#textSpan {