Skip to content

Instantly share code, notes, and snippets.

@mrb
mrb / abstint.md
Last active October 4, 2020 18:45
"Programs that eat programs" Works cited/bibliography
@gbluma
gbluma / gist:fa6ccb968681a4f5a024
Created December 27, 2014 22:41
c code security check
egrep '[^_.>a-zA-Z0-9](str(n?cpy|n?cat|xfrm|n?dup|str|pbrk|tok|_)|stpn?cpy|a?sn?printf|byte_)'
@gbluma
gbluma / hindley-milner.php
Created September 18, 2014 17:53
A Hindley-Milner type system in PHP
<?php
/** Lambda abstraction */
class Lambda
{
function __construct($v, $body) {
$this->v = $v;
$this->body = $body;
}
@gbluma
gbluma / Readme.md
Last active April 17, 2022 18:11
Writing tool that inserts newlines after every prepositional phrase.

I like to use a technique from Richard Lanham's book "Revising Prose" to help myself write better English sentences. In the book, Lanham suggests that we break apart sentences at each predicate. Doing this helps us visually see the structure of our words. Errors and issues with flow stand out immediately. Likewise, sentences that contain many predicates don't flow nicely.

Splitting these sentences manually is a bit of work. Fortunately a computer can do this work trivially. It is not a problem to repetitively split apart sentences based on simple rules. Below is a program I

@netj
netj / memusg
Last active January 29, 2024 15:04
memusg -- Measure memory usage of processes
#!/usr/bin/env bash
# memusg -- Measure memory usage of processes
# Usage: memusg COMMAND [ARGS]...
#
# Author: Jaeho Shin <netj@sparcs.org>
# Created: 2010-08-16
############################################################################
# Copyright 2010 Jaeho Shin. #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #