Skip to content

Instantly share code, notes, and snippets.

View milesrout's full-sized avatar

Miles Rout milesrout

View GitHub Profile
D:
cd "Program Files\Oracle\VirtualBox"
VBoxManage.exe setextradata "Arch2" "CustomVideoMode1" "1920x1200x24"
I was proudly shown some production "web code" yesterday. Cutting
edge stuff, apparently. A single file contained HTML, css, and JS.
The first thing that hit me is JS didn't contain any semicolon's -
something I found disquieting. I was told "no, we don't use them
any more". But what about the problems with that pointed out by
"Javascript - The Good Parts", I asked. The reply was, "oh, no
one does this stuff without running it through an aggressive
linter, so its completely safe - mostly strictly type safe in
fact". (That was nice - evidently at least some of the scars
@milesrout
milesrout / humour.py
Created January 23, 2017 08:04 — forked from louisswarren/humour.py
A turing machine can't solve the halting problem, but it can solve the hilarity problem, right gang?
prepositions = """
aboard, about, above, across, after, against, along, amid, among, anti,
around, as, at, before, behind, below, beneath, beside, besides, between,
beyond, but, by, concerning, considering, despite, down, during, except,
excepting, excluding, following, for, from, in, inside, into, like, minus,
near, of, off, on, onto, opposite, outside, over, past, per, plus,
regarding, round, save, since, than, through, to, toward, towards, under,
underneath, unlike, until, up, upon, versus, via, with, within, without
""".split(', ')
@milesrout
milesrout / meeting.txt
Created December 23, 2016 01:08 — forked from Olical/meeting.txt
Trillek design meeting log 1
* Now talking on ##secretsecret123
<Wolfy87> So stealthy.
<mrout> Sooooo stealthy.
* ChemicalRascal ([email protected]) has joined ##secretsecret123
<ChemicalRascal> Boo.
<Wolfy87> 3/5 or so. Not bad.
<mrout> Secret secret indeed.
<mrout> Not bad at all.
<Wolfy87> Are we really expecting anyone else?
<ChemicalRascal> DarkSpartan, Terry indicated that they were able to make the time, I think.
import collections
import random
def randprog(length=12):
return ''.join(random.choice('><+-[]') for i in range(length))
def execute(prog, tape):
i = 0
j = 0
l = len(prog)
@milesrout
milesrout / Makefile
Last active December 20, 2016 01:02
Lakefile (lake is logical make, a reimplementation of make built around the concept that make is really just a constructive logic programming language).
# Traditional Makefile style: (different wildcard symbol)
# \forall_{$} $.c -> $.o
*.o: *.c
gcc -c $.c -o $.o
# From and to variables:
# Using $^ (from) and $v (to)
*.o: *.c
gcc -c $^ -o $v
/*
* Evaluate the expression used in a ":for var in expr" command.
* "arg" points to "var".
* Set "*errp" to TRUE for an error, FALSE otherwise;
* Return a pointer that holds the info. Null when there is an error.
*/
void *eval_for_line(char_u *arg, int *errp, char_u **nextcmdp, int skip)
{
forinfo_T *fi;
char_u *expr;
@milesrout
milesrout / power-literals.cpp
Last active November 6, 2016 22:27
Ever want to just be able to write `512 K` instead of `512 * 1024` or `524288` in code? Well, wish no more.
#include <iostream>
#include <limits>
#include <stdexcept>
#include <exception>
using namespace std;
static const unsigned long long int max_ull
= std::numeric_limits<unsigned long long int>::max();
constexpr unsigned long long int
@milesrout
milesrout / scybot-quotes
Created October 20, 2016 22:11
scybot-quotes
<milesrout> quote 1
<scybot> [1/1] 2012-04-09 <rmmh> dcpu studio feels like a post-USSR pascal programmer wrote it
<milesrout> quote 2
<scybot> [1/1] 2012-04-10 <Tobba> this is genius as fuck
<milesrout> quote 3
<scybot> [1/1] 2012-04-10 <Tobba> this is artistic as fuck
<milesrout> quote 4
<scybot> [1/1] 2012-04-10 <Tobba> the entire function is pure magic lol
<milesrout> quote 5
<scybot> [1/1] 2012-04-10 <MostAwesomeDude> I'm unquotable.
<milesrout> quote 1
<scybot> [1/1] 2012-04-09 <rmmh> dcpu studio feels like a post-USSR pascal programmer wrote it
<milesrout> quote rmmh
<scybot> no quotes found
<milesrout> quote 2
<scybot> [1/1] 2012-04-10 <Tobba> this is genius as fuck
<milesrout> quote 3
<scybot> [1/1] 2012-04-10 <Tobba> this is artistic as fuck
<milesrout> quote 4
<scybot> [1/1] 2012-04-10 <Tobba> the entire function is pure magic lol