Skip to content

Instantly share code, notes, and snippets.

@jart
jart / .screenrc
Created October 10, 2013 03:35
GNU Screen Bitcoin Ticker
## GNU Screen Configuration
## Justine Tunney <jtunney@gmail.com>
# GNU Screen + this config allow you to:
#
# - Have tabs inside your terminal.
#
# - Have your terminal sessions persist, even if you close your ssh connection.
# This is especially great if you hop between multiple computers or simply
# don't want to lose what you're working on.
@jart
jart / mtgox.php
Created March 12, 2014 16:05
Some Mt.Gox Source Code
<?php
namespace Money;
class Bitcoin {
#const BITCOIN_NODE = '173.224.125.222'; // w001.mo.us temporary
const BITCOIN_NODE = '50.97.137.37';
static private $pending = array();
public static function update() {
@jart
jart / acidos.asm
Last active June 25, 2021 00:52
AcidOS
;
; ACID OPERATING SYSTEM
; Only 324 Bytes!
; Never Crashes!
; Loads in less than a second off a floppy!
; Runs on any IBM computer (even the 8086!)
;
; Copyright (c) 2003 Justine Tunney
; Licensed Apache 2.0
;
@jart
jart / dawkins.markdown
Created June 8, 2014 19:28
How Dawkins Got Pwnd by Mencius Moldbug (37,941 words)

How Dawkins got pwnd

By Mencius Moldbug c. Sep 2007

Part 1

Richard Dawkins recently wrote a book called The God Delusion. You've probably heard of it.

Professor Dawkins is a great scientist and one of my favorite writers. And I have no quarrel at all with his argument. I was raised as a scientific atheist, and I've never seen the slightest reason to think otherwise. These days I prefer the word "nontheist" - for reasons which will shortly be clear - but there's no substantive difference at all. Except in the context of role-playing games, I have no interest whatsoever in gods, goddesses, angels, devils, dryads, water elementals, or any such presumed metaphysical being.

Nonetheless, it's my sad duty to inform the world that Professor Dawkins has been pwned. Perhaps you're over 30 and you're unfamiliar with this curious new word. As La Wik puts it:

@jart
jart / gist:c32796c46d5bb5b39a04
Last active August 29, 2015 14:04
Poetry generated by Poemy2 using comments posted to Reddit by anarchists
master jart@bean:~/poemy2$ ./poemy --alsologtostderr --foot=trochaic --length=tetrameter --tries=20 --lines=200 --corpora=moonbat --dict=isle 2>/dev/null | python ~/mop.py
when the group is largely roiling, even in the war and losing
by the spanish revolution, as a way of distribution
phony claim that israel murders, please just take it for the last years
who is really important, that resulted in a different
only reason that this matters, opposition to the workers
tv has been waiting, listening to the state demanding
prices are a lot of human, here is the initiation
the position here is blaming, here's a bunch of people doing
soldiers know the whole entire, and with all of the oppressor
@jart
jart / lolc.sh
Last active June 7, 2023 15:44
Run C code in Bash
#!/bin/bash
# lolc.sh - run c code in bash
# by justine tunney <jtunney@gmail.com>
# licensed mit or apache 2.0
runc() {
local bin=$(mktemp -u)
gcc -xc -o ${bin} /dev/stdin || return
chmod u+x ${bin}
${bin} "$@"
@jart
jart / ordinary.c
Created December 28, 2015 16:38
Perfectly Ordinary C
/**//*
*//** This is perfectly ordinary C
**//*
*//** cc -std=c99 lol.c
**//* ./a.out justine 31
*//**/
#include <stdio.h>
#include <stdlib.h>
@jart
jart / WORKSPACE
Created March 4, 2016 15:54
App Engine Bazel Stuff
maven_jar(
name = "appengine_api_sdk",
artifact = "com.google.appengine:appengine-api-1.0-sdk:1.9.30",
sha1 = "239376bdb4d57e2c2f5b61197ad11cb5eeca6b6c",
)
maven_jar(
name = "appengine_api_labs",
artifact = "com.google.appengine:appengine-api-labs:1.9.30",
# -*- mode:python; -*-
#
# Copyright 2016 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@jart
jart / gzip-benchmark.py
Created August 11, 2016 22:43
Python GZip Benchmark
#!/usr/bin/env python
#
# tl;dr: compresslevel=1 is 4x faster than the default and nearly as good
#
# https://docs.python.org/2/library/gzip.html
#
# http11 jart@compy://third_party/tensorflow/tensorboard$ python ~/doodle.py
# 1 5% 151ms
# 2 4% 149ms
# 3 4% 143ms