Skip to content

Instantly share code, notes, and snippets.

@gnull
gnull / trace.txt
Created June 5, 2016 21:14
Perl6 stack trace
======= Backtrace: =========
/lib/i386-linux-gnu/libc.so.6(+0x756fb)[0xb72c96fb]
/lib/i386-linux-gnu/libc.so.6(+0x76440)[0xb72ca440]
/lib/i386-linux-gnu/libc.so.6(closedir+0x28)[0xb72f41f8]
/home/gnull/prefix/lib/libmoar.so(MVM_dir_close+0x41)[0xb74b9321]
/home/gnull/prefix/lib/libmoar.so(MVM_interp_run+0xa9d4)[0xb747e6a4]
/home/gnull/prefix/lib/libmoar.so(+0xac0d2)[0xb74980d2]
/home/gnull/prefix/lib/libmoar.so(+0x17e6f0)[0xb756a6f0]
/lib/i386-linux-gnu/libpthread.so.0(+0x6a0d)[0xb71fda0d]
/lib/i386-linux-gnu/libc.so.6(clone+0x5e)[0xb732dece]
@gnull
gnull / farm.p6
Created June 5, 2016 20:08
Perl6 segfaulting code.
#!/usr/bin/env perl6
use v6;
use JSON::Tiny;
sub MAIN(Str $exploitd = './exploitd/', Str $config-file = './farm.json') {
my $config = from-json slurp $config-file;
my $flagre = $config<flag_regex> || '\w+';
@gnull
gnull / queue.c
Created April 14, 2015 12:44
MC homework #2
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#ifndef QUEUE_MAXLEN
#define QUEUE_MAXLEN 0x10
#endif
#define E_EMPTY -1
#define E_FULL -2
@gnull
gnull / stm32f10x_crc.c
Created April 12, 2015 20:04
Microcontrollers Course Homework
#define bytes_to_long(a,b,c,d) ( ((d) << 24) | ((c) << 16) | ((b) << 8) | (a) )
/**
* @brief Computes the 32-bit CRC of a given buffer of data word(32-bit).
* @param pBuffer: pointer to the buffer containing the data to be computed
* @param BufferLength: length of the buffer to be computed
* @retval 32-bit CRC
*/
uint32_t CRC_CalcBlockCRC(uint8_t pBuffer[], uint32_t BufferLength)