Skip to content

Instantly share code, notes, and snippets.

View lolzballs's full-sized avatar

Benjamin Cheng lolzballs

View GitHub Profile
lolzballs / iptables.rules
Last active June 8, 2019 00:42
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p udp --dport 5353 -j ACCEPT
* Copyright (c) 2017, Jeff Hlywa (
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
from scipy.optimize import curve_fit
import numpy as np
import matplotlib.pyplot as plt
class measurement:
def __init__(self, val, err):
self.val = val
self.err = err
def __repr__(self):
* Copyright (C) 2015 - 2016 Bosch Sensortec GmbH
* bno055_support.c
* Date: 2016/03/14
* Revision: 1.0.4 $
* Usage: Sensor Driver support file for BNO055 sensor
lolzballs / appinfoparser.cpp
Created July 23, 2015 14:38
Very rough parser for Steam's appinfo.vdf
#include <cstdint>
#include <boost/any.hpp>
#include <string>
#include <unordered_map>
#include <fstream>
#include <iostream>
#define MAGIC_VALUE 0x07564426
uint32_t read32_le(std::istream& stream)

Keybase proof

I hereby claim:

  • I am lolzballs on github.
  • I am lolzballs ( on keybase.
  • I have a public key whose fingerprint is 355B F314 F9FF B3D9 80CC A4BA 4FE2 2E75 28E9 7BD8

To claim this, I am signing this object:

lolzballs / Python Imgur Uploader
Created May 30, 2015 01:11
Uploads images from clipboard to imgur and put the link in your clipboard
import pygtk
import gtk
import sys, os
import cStringIO
import base64
import json
lolzballs /
Created March 22, 2015 00:21
Hello World Enterprise Edition
public class HelloWorld{
private static HelloWorld instance;
public static void main(String[] args){
lolzballs /
Created September 15, 2013 18:03
Test plugin for minecart
package tk.teamfield3.test;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.vehicle.VehicleMoveEvent;
public class Test extends JavaPlugin implements Listener {