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
;/ DrinkFromWaterFountainScript for Finite Water | |
/ Copyright (c) 2017 Oskar Sveinsen | |
/ | |
/ Permission is hereby granted, free of charge, to any person obtaining a copy | |
/ of this software and associated documentation files (the "Software"), to deal | |
/ in the Software without restriction, including without limitation the rights | |
/ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
/ copies of the Software, and to permit persons to whom the Software is | |
/ furnished to do so, subject to the following conditions: | |
/ |
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
export PROJECTFILE ?= $(realpath Project) | |
CHILDREN ?= $(sort $(dir $(wildcard */Makefile.custom) $(wildcard */Makefile))) | |
CHILDCARD ::= $(addsuffix %,$(CHILDREN)) | |
%: $(CHILDCARD) | |
$(CHILDCARD): | |
dir = ${$@%%/*} | |
cd $dir | |
reltarget = ${$@#*/} | |
( test -f Makefile.custom\ |
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 "parser.h" | |
/* general */ | |
Nonterminal n_doc_string = { | |
PROD_LEAF(t_bracket_curly_closing), | |
PROD(NULL, n_doc_string), | |
}; | |
Nonterminal n_doc = { |
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
/* pas - papyrus assembler | |
* Copyright (C) 2017 Oskar Sveinsen | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
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 <stdint.h> | |
#include <stdio.h> | |
#include <string.h> | |
#define FORDICE(n) for (dice[n] = 1; dice[n] <= 6; dice[n]++) | |
typedef uint_least8_t Score; | |
typedef uint_fast8_t Die; | |
Die dice[5]; |
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 <math.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include "arg.h" | |
static void | |
usage(void) | |
{ | |
printf(stderr, "usage: %s [-b base] [-l length]", argv0); |
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/awk -f | |
# table.awk - render [delimiter-separated values](https://en.wikipedia.org/wiki/Delimiter-separated_values) | |
# Example usage: | |
# awk -F , table.awk input.csv | |
# awk -F "\t" table.awk input.tsv | |
# ./table.awk FS=, input.csv | |
# ./table.awk FS="\t" input.tsv | |
NR == 1 && ARGV[ARGC - 1] == FILENAME { ARGV[ARGC++] = FILENAME; } |
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
+-------------------------------+-----+---+---+---+ | |
| MSB LSB | ASM |arg|pop|psh| | |
+---+---+---+---+---+---+---+---+-----+---+---+---+ | |
| | | | 0 | 0 | 0 | 0 | 0 | ADD | 0 | 2 | 1 | | |
| | | | | | | | 1 | INC | 0 | 1 | 1 | | |
| | | | | | | 1 | 0 | SUB | 0 | 2 | 1 | | |
| | | | | | | | 1 | DEC | 0 | 1 | 1 | | |
| | | | | +---+---+---+-----+---+---+---+ | |
| | | | | | 1 | 0 | 0 | MUL | 0 | 2 | 1 | | |
| | | | | | | | 1 | MUL | 0 | 2 | 1 | |
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
// ==UserScript== | |
// @name posix-linker | |
// @namespace https://github.com/osvein | |
// @description adds some missing links from XBD header pages to XSU function pages in the online POSIX standard viewer | |
// @include http://pubs.opengroup.org/onlinepubs/9699919799/ | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
var frame = document.getElementById('main'); |
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 | |
public="true" | |
desc= | |
host="api.github.com" | |
port="443" | |
endpoint="/gists" | |
repourl="https://gist.github.com" | |
creds="url=$repourl | |
" |