Skip to content

Instantly share code, notes, and snippets.

@shakna-israel
shakna-israel / LetsDestroyC.md
Created January 30, 2020 03:50
Let's Destroy C

Let's Destroy C

I have a pet project I work on, every now and then. CNoEvil.

The concept is simple enough.

What if, for a moment, we forgot all the rules we know. That we ignore every good idea, and accept all the terrible ones. That nothing is off limits. Can we turn C into a new language? Can we do what Lisp and Forth let the over-eager programmer do, but in C?


@hubgit
hubgit / convert-square.sh
Last active June 7, 2018 08:31
Convert a rectangular SVG to a square PNG, with a transparent background
#/bin/bash
# wget https://upload.wikimedia.org/wikipedia/commons/2/25/Open_Access_logo_PLoS_white.svg -O icon.svg
for SIZE in 16 32 48 64 128; do
convert -background none icon.svg -transparent white -gravity center -resize "$SIZE>x$SIZE" -extent $SIZEx$SIZE icon$SIZE.png;
done
for SIZE in 16 32 48 64; do
convert -background none icon.png -gravity center -resize "$SIZE>x$SIZE" -extent $SIZEx$SIZE icon$SIZE.png;
done