This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import sys | |
def parse_nm_output(handle): | |
current_object = None | |
symbols = {} | |
symbol_to_object = {} | |
for line in handle.readlines(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* SPSC Bounded Queue | |
* Based on public domain C++ version by mstump[1]. Released under | |
* the same license terms. | |
* | |
* [1] https://github.com/mstump/queues/blob/master/include/spsc-bounded-queue.hpp | |
*/ | |
#if !defined(__ATOMIC_RELAXED) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdbool.h> | |
#include <stdlib.h> | |
struct task { | |
void *(*cb)(void *data); | |
void *data; | |
bool runnable; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import math | |
def pack_bits(*bits): | |
n = 0 | |
max_n = 1 | |
for value, prime_for_value in bits: | |
while n % prime_for_value != value: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* ---------------------------------------------------------------------------- | |
* "THE MATE-WARE LICENSE" (Revision 42): <leandro@tia.mat.br> wrote this | |
* file. As long as you retain this notice you can do whatever you want | |
* with this stuff. If we meet some day, and you think this stuff is worth | |
* it, you can buy me a Club-Mate in return. Leandro Pereira | |
* ---------------------------------------------------------------------------- | |
*/ | |
#include <arpa/inet.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
package main | |
import "fmt" | |
func main() { | |
fmt.Println("counting"); | |
for i := 0; i < 10; i++ { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import mraa | |
import time | |
import pyupm_i2clcd | |
import pyupm_grove | |
import SimpleXMLRPCServer | |
import netifaces as ni | |
import threading | |
import Queue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* parse_number() using C11 _Generic */ | |
/* @lafp, 2015-06-07 */ | |
#include <stdlib.h> | |
#include <stdbool.h> | |
#include <stdio.h> | |
#include <errno.h> | |
#define parse_number(Input, Output) \ | |
_Generic((*Output), \ | |
int: parse_number_strtoint, \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
New Old | |
movsx esi,BYTE PTR [r14+0x8] movsx esi,BYTE PTR [r13+0x8] | |
mov rdi,r12 mov rdi,rbp | |
add rbx,0x1 add r13,0x18 | |
call 0x412fd0 <strbuf_append_char> call 0x413ed0 <strbuf_append_char> | |
mov rax,QWORD PTR [r15+rbx*8] mov eax,DWORD PTR [r13+0x0] | |
jmp QWORD PTR [rax*8+0x416440] mov rax,QWORD PTR [rax*8+0x4166a0] | |
jmp rax |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
exec wrk -H 'Host: localhost' \ | |
-H 'Accept: text/plain,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7' \ | |
-H 'Connection: keep-alive' \ | |
-d 10 \ | |
-c 1000 \ | |
--timeout 16384 \ | |
-t 4 \ | |
http://127.0.0.1:8080/hello \ |