Skip to content

Instantly share code, notes, and snippets.

View vijfhoek's full-sized avatar

Sijmen vijfhoek

View GitHub Profile
@vijfhoek
vijfhoek / gist:1064513
Created July 5, 2011 09:01
Client spam?
[%] GodMcBot •·~minecraft@84.201.4.168·• is on [emma.kottnet.net/0] - (here) name:[CraftIRC v2.0 Preview 11]
[%] moro •·znc@bnc.skyirc.net·• is on [felicia.kottnet.net/1] - (here) name:[Moritz]
[%] B •·~B@Death.is.hereditary·• is on [emma.kottnet.net/0] - (away) name:[B]
[%] Netherland •·~netherlan@netherland.users.kottnet.net·• is on [emma.kottnet.net/0] - (here) name:[netherland]
[%] mainframe •·~mainframe@2a01:4f8:131:c3:dead:beef:dead:beef·• is on [emma.kottnet.net/0] - (away) name:[Miguel M rodriguez]
[%] khmerboy •·~khmerboy@i.am.me·• is on [emma.kottnet.net/0] - (here) name:[khmerboy]
[%] harfox- •·~harfox-@2a01:4f8:131:c3:dead:beef:dead:beef·• is on [emma.kottnet.net/0] - (here) name:[harfox-]
[%] Driehoek •·~driehoek@god-division.co.cc·• is on [emma.kottnet.net/0] - (here) name:[driehoek]
[%] Magix •·~Magix@BeefNet.co.cc·• is on [emma.kottnet.net/0] - (away) name:[Marvin]
[%] F16Gaming •·~F16Gaming@f16gaming.com·• is on [emma.kottnet.net/0] - (here) name:[F16Gaming]
#define _CRT_SECURE_NO_WARNINGS /* Shut up, Visual Studio */
#include <stdio.h>
#include <stdlib.h>
#include <SOIL.h>
const char *asciichars = "#*+=-:. ";
int main(int argc, char **argv) {
if (argc != 3) { printf("Syntax: %s <infile> <outfile>\n", argv[0]); return -1; }
#include "Block.h"
#include <GL\glew.h>
#include <GLFW\glfw3.h>
Block::Block(const unsigned int blockID, const Vec3<double> position)
: blockID(blockID), position(position)
{
// Generate a vertex array
double vertices[] =
{
namespace Z80
{
public partial class HD44780 : UserControl
{
#region font
private byte[,] font = new byte[256,8] {
/* 01 */ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // cgram 0
/* 00 */ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // cgram 1
/* 02 */ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // cgram 2
/* 03 */ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // cgram 3

Keybase proof

I hereby claim:

  • I am Vijfhoek on github.
  • I am vijfhoek (https://keybase.io/vijfhoek) on keybase.
  • I have a public key whose fingerprint is 56BB DEAA C87E 2673 CAE8 242D 30E0 279F FE13 745A

To claim this, I am signing this object:

[vijfhoek@sijmen-laptop Algorithms]$ python shuntingyard.py 1
['1']
[vijfhoek@sijmen-laptop Algorithms]$ python shuntingyard.py 1+5
['1', '5', '+']
[vijfhoek@sijmen-laptop Algorithms]$ python shuntingyard.py 1+5*3
['1', '5', '3', '*', '+']
[vijfhoek@sijmen-laptop Algorithms]$ python shuntingyard.py 1*5+3
['1', '5', '*', '3', '+']
[vijfhoek@sijmen-laptop Algorithms]$ python shuntingyard.py 3X+5
['3', 'X', '*', '5', '+']
@vijfhoek
vijfhoek / test.java
Last active September 16, 2015 22:44
class LolThisIsAVeryLongClassName
extends AnotherExtremelyLongClassName {
public static int HelloWorld(String a,
String b, String c, String d,
String e, String f) {
System.out.println("Hello " + a + b
+ c + " world " + d + e + f +
"!");
}

Keybase proof

I hereby claim:

  • I am sijmenschoon on github.
  • I am vijfhoek (https://keybase.io/vijfhoek) on keybase.
  • I have a public key whose fingerprint is 76DE 0896 0D85 7CB7 F786 EFD0 47D2 2F4C DEBF 6D16

To claim this, I am signing this object:

@vijfhoek
vijfhoek / fix_telegram.md
Last active November 7, 2016 18:15 — forked from afogal/fix_telegram_bubbles.md
How to fix the really really round telegram bubbles and << >> -- stuff

Here is a GDB script to fix it (tested on GNU/Linux only):

 tbreak _ZN3App9initMediaEv
 commands
     set {char}_ZN3App9msgRadiusEv=0xB8
     set {int}(_ZN3App9msgRadiusEv+1)=3
     set {char}(_ZN3App9msgRadiusEv+5)=0xC3
     set {char}_Z25replaceStringWithEntitiesRK13QLatin1String5QCharR7QStringP5QListI12EntityInTextEb = 0xC3
 end

run

#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <tree_sitter/api.h>
#include <tree_sitter/highlight.h>
TSLanguage *tree_sitter_c();
int main() {
// Create a parser.