Skip to content

Instantly share code, notes, and snippets.

#include <sys/mman.h>
#include <sys/wait.h>
#include <unistd.h>
#include <stdio.h>
int main()
{
int status;
int *mem = (int *)mmap(NULL, sizeof(int), PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0);
*mem = 1;
/*
Copyright 2014 Ben Longbons, GPL2+.
This version is known to be slightly buggy.
*/
#define _REENTRANT
#define _GNU_SOURCE
#include <sys/ioctl.h>
#include <sys/resource.h>
language gnu-c
keyword auto
keyword break
keyword case
keyword const
keyword continue
keyword default
keyword do
keyword else
%token END 0 "end of file"
/* tokens */
%token BANG "!"
%token TILDE "~"
%token COMMA ","
%token SEMICOLON ";"
%token QUERY "?"
%token COLON ":"
%token ARROW "->"
https://github.com/o11c/chintzy/tree/master-py/chintzy/_std
but note that they do need to be transformed to give names to all the intermediate trees.
Also there is a merged grammar from the `candide` bot:
https://github.com/pragma-/pbot/blob/master/modules/c2english/CGrammar.pm
Thread 6 (Thread 0x7fffdd868700 (LWP 32745)):
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
No locals.
#1 0x00007fffe46b2dfb in ?? () from /usr/lib/x86_64-linux-gnu/dri/r600_dri.so
No symbol table info available.
#2 0x00007fffe46b2657 in ?? () from /usr/lib/x86_64-linux-gnu/dri/r600_dri.so
No symbol table info available.
#3 0x00007ffff792b0a4 in start_thread (arg=0x7fffdd868700) at pthread_create.c:309
__res = <optimized out>
diff --git a/DataHandler.cpp b/DataHandler.cpp
index e251d7e..2cab845 100644
--- a/DataHandler.cpp
+++ b/DataHandler.cpp
@@ -26,7 +26,7 @@
DecodeState::DecodeState ( DecoderStateValue state_value )
{
state = state_value;
- endianness = LITTLE_ENDIAN;
+ endianness = DUMPSTER_LITTLE_ENDIAN;
import functools
import math
arg_angle = ['sin', 'cos', 'tan', 'sinh', 'cosh', 'tanh']
ret_angle = ['asin', 'acos', 'atan', 'atan2', 'asinh', 'acosh', 'atanh']
def wrap_arg(f):
@functools.wraps(f)
def f2(arg):
return f(math.radians(arg))
@o11c
o11c / all
Last active August 29, 2015 14:14
// Now tmwa can bitch at you for more reasons.
// Merge conflicts in this file should be few because you should *not* be
// adding new variables for every quest. Well, except locals ...
// Suggested policy:
// * Use this file for everything *except* @locals.
// * Use per-script files for @locals.
//
// Important note! The questlog script only reads this file!
@o11c
o11c / Makefile
Created January 1, 2015 00:29
hard-coded bug correct makefile forwarding (with special rules)
SHELL=/bin/bash
MAYBE_PIPEFAIL =
MAYBE_PIPE =
ifneq '' '${VIMRUNTIME}'
MAYBE_PIPEFAIL = set -o pipefail;
MAYBE_PIPE = 2>&1 | sed -u -e ':begin;s:[^ /]*/\.\./::;t begin;s:\.\./src:src:g;/ing directory ..home.ben.src.tmwa./d;s:/home/ben/src/tmwa/build:/home/ben/src/tmwa:g'
endif
.DEFAULT_GOAL := all
.PHONY: ${MAKECMDGOALS}