Skip to content

Instantly share code, notes, and snippets.

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCkB8ZzeCZxUCY51wgGRdplk2NckN/V6OA5BviIveHmPBIxEssmKcPLzOfobgVaEhccqe4tdikVOvxCFzb0NXPw1GZYZ2ORYE9gFadfBwVgMOl1Zl2tdbj+VDM9E19Fc7PoFpLrdwa2AHix81rp6JLe01uZytgXuiKaIC/VweBCiXKGDYbVi8OdClNeSomV4wq/y1om4VN6lvx7H1H18GXMEIvHFlsojXwAWcT2eekc3Ofu8U2+T30jD9gSc7q+K3dqqIubF6mwYSIxcYLrT3HSZlNfToiHuZ/opiW1UjGkQMWrSIroRol/sEoXEgZhRt3ypT3iiWvUDWlW22NwLlwb+sJq6QzCTPMpgCj8WKBbpLl9IUC/k44GAeTA1LNwbXX8Wpp66EdwHtUr+HlS5/b2QENv8DDOGgD1Kgs7FrBhtvPCvlbd6K8pCrgjF8H9yh2mEeQ+3WqIarFJyiMeHCNpDnL6X6xqaNx6CDmiaHRFDm24fhjNQaHx5iMrX8I/qe0= antonijn@adb-desktop
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCMFwA6CSrK730OMOJhhuuMV5uHHTwcDALQj2iKbADzGX/zc0nsJ6ZU8lHnzMhgK2IaBGuMWrE6hxUPPLRciMbbiXiHy5ai8x4ffbLl8bUqlUVfANuA0HBMndXTxFokTw/Op8sFlBwYiwzOjkO3qHPo/Cqg5NC3GkwjnyQId8yNPMNljDZR9HZr0IkdWhaSdpjIsASpomWKcyyYfFfWGDQv/OrqpAmEJh4QN6yZI8Y4aDWtc8FvQDSCUjaElE2uzBmINJC6S9slFhCMA93QmmtgpyOZQ8HQlPe7m31DtSsBE1sAfoMC6cGN+FDIZJIdua8A5z0eZYnCPOrwztH63i6Eqa+Rn26JLFXKhgN+cYF3ZtBxDEg3cHhe9WRcP/bgxLPMbonc3/dlBhZ2chQ/Zug1D7G6y2
@antonijn
antonijn / init.vim
Created October 5, 2022 08:08
My Neovim config
call plug#begin()
Plug 'tomasr/molokai'
Plug 'itchyny/lightline.vim'
call plug#end()
filetype plugin on
set mouse=a
@antonijn
antonijn / .bashrc
Created October 5, 2022 08:06
My bashrc
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific environment
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:$HOME/code/tools/text-tools/bin" ]]
then
@antonijn
antonijn / main.c
Created January 3, 2021 15:37
cheax C++ API concept
#include <cheax.h>
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
int result;
CHEAX *c = cheax_init();
%code requires {
#include "types.h"
#include <stddef.h>
#include <stdio.h>
}
%code {
int yylex();
void yyerror(ASTFileElement **f, const char *msg);
}
@antonijn
antonijn / CTokens.pm6
Created August 2, 2017 10:16
Perl 6 version of `spt` program (CTokens.pm6 should be in lib dir relative to the main spt file)
use v6;
unit module CTokens;
grammar CTokens::Token is export {
token TOP {
[
<preproc> |
<comment> |
<line-comment> |

Typical Usage of groc

The example presented here shows how one would use groc to create an internationalized die-roll application:

$ roll
You rolled a one
$ roll
antonijn, 2017
___ _ _ _ _
|_ _|_ _| |_ _ _ ___ __| |_ _ __| |_(_)___ _ _
| || ' \ _| '_/ _ \/ _` | || / _| _| / _ \ ' \
|___|_||_\__|_| \___/\__,_|\_,_\__|\__|_\___/_||_|
Because all other text editors suck (although
$ ./cheaky
> (let i 0)
> i
0
> (let j 10)
> j
10
> (let k j)
> k
10
@antonijn
antonijn / list.h
Last active April 18, 2016 17:32
Linux kernel linked list, modified for userspace
#ifndef LINUX_LIST_H
#define LINUX_LIST_H
#include <stddef.h>
/**
* container_of - cast a member of a structure out to the containing structure
* @ptr: the pointer to the member.
* @type: the type of the container struct this is embedded in.
* @member: the name of the member within the struct.