Skip to content

Instantly share code, notes, and snippets.

Thiago Kenji Okada thiagokokada

Block or report user

Report or block thiagokokada

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
mdonkers /
Created Mar 29, 2017
Simple Python 3 HTTP server for logging all GET and POST requests
#!/usr/bin/env python3
Very simple HTTP server in python for logging requests
./ [<port>]
from http.server import BaseHTTPRequestHandler, HTTPServer
import logging
class S(BaseHTTPRequestHandler):
dfee /
Last active Oct 15, 2019
Python IPV4 / IPV6 Regular Expressions (REGEX)
# Constructed with help from
# Try it on regex101:
import re
IPV4SEG = r'(?:25[0-5]|(?:2[0-4]|1{0,1}[0-9]){0,1}[0-9])'
IPV4ADDR = r'(?:(?:' + IPV4SEG + r'\.){3,3}' + IPV4SEG + r')'
IPV6SEG = r'(?:(?:[0-9a-fA-F]){1,4})'
phiresky / motioninterpolation.vpy
Last active Feb 2, 2020
Realtime motion interpolating 60fps playback in mpv
View motioninterpolation.vpy
# vim: set ft=python:
# see the README at
# source:
# source:
# source:
import vapoursynth
core = vapoursynth.get_core()
HoX / switchs.h
Created Apr 13, 2015
Switch operand implementation for the strings
View switchs.h
#ifndef __SWITCHS_H__
#define __SWITCHS_H__
#include <string.h>
#include <regex.h>
#include <stdbool.h>
/** Begin a switch for the string x */
#define switchs(x) \
{ char *__sw = (x); bool __done = false; bool __cont = false; \
View beamer-slides-with-notes.pdf
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
glnds /
Last active Dec 30, 2019
Vim Cheatsheet

Vim Cheatsheet

vim {filename}
:e {filename} edit a file
:q quit
:q! quit without writing
:wa write all changed files (save all changes), and keep working


a collection of useful commands to use Git and GitHub.


add files interactively

git add <file> --patch

# working example

Note: this is a summary of different git workflows putting together to a small git bible. references are in between the text

How to Branch

try to keep your hacking out of the master and create feature branches. the [feature-branch workflow][4] is a good median between noobs (i have no idea how to branch) and git veterans (let's do some rocket sience with git branches!). everybody get the idea!

Basic usage examples

panzi / portable_endian.h
Last active Dec 5, 2019
This provides the endian conversion functions form endian.h on Windows, Linux, *BSD, and Mac OS X. You still need to use -std=gnu99 instead of -std=c99 for gcc. The functions might actually be macros. Functions: htobe16, htole16, be16toh, le16toh, htobe32, htole32, be32toh, le32toh, htobe64, htole64, be64toh, le64toh. License: I hereby put "port…
View portable_endian.h
// "License": Public Domain
// I, Mathias Panzenböck, place this file hereby into the public domain. Use it at your own risk for whatever you like.
// In case there are jurisdictions that don't support putting things in the public domain you can also consider it to
// be "dual licensed" under the BSD, MIT and Apache licenses, if you want to. This code is trivial anyway. Consider it
// an example on how to get the endian conversion functions on different platforms.
#if (defined(_WIN16) || defined(_WIN32) || defined(_WIN64)) && !defined(__WINDOWS__)
jasonrudolph /
Last active Jan 21, 2020
5 entertaining things you can find with the GitHub Search API
You can’t perform that action at this time.