Skip to content

Instantly share code, notes, and snippets.

@rcfox
rcfox / science.dot
Created April 16, 2016 11:12
Production graph of science packs in Factorio
digraph Science {
style=invis; // Remove borders around clusters
edge[dir=back]; // Too lazy to fix the way I input everything...
node[label=""]; // Remove all of the text from nodes.
science1 [image="Science-pack-1.png"]
science2 [image="Science-pack-2.png"];
science3 [image="Science-pack-3.png"];
@rcfox
rcfox / gist:4043712
Created November 9, 2012 04:40
Hide XML End Tags
(setq hidden-end-tags-overlays '())
(defun hide-all-end-tags ()
(interactive)
(save-excursion
(goto-char (point-min))
(while (re-search-forward "</" nil t)
(let ((overlay-start (- (point) 2)))
(re-search-forward ">" nil t)
(hide-end-tag overlay-start (point))))))
# default.o.do
# apenwarr's version doesn't escape the slashes in the file name, so it doesn't work on subdirectories.
redo-ifchange $1.c
CFLAGS="..."
INCLUDE="..."
g++ $CFLAGS $INCLUDE -MD -MF $3.deps.tmp -c -o $3 $1.c
grammar Parser::English
{
rule TOP { <sentence> };
rule sentence
{
<noun_phrase> <verb_phrase>
| <noun_phrase> <auxillary> <verb_phrase>
| <auxillary> <noun_phrase> <verb_phrase>
};
use v6;
use Math::Matrix;
my @theta = 0,0;
my @d = 3,1;
my @a = 2,2;
my @alpha = 0,0.7;
my $T01 = Math::Matrix.new(data =>
(