Skip to content

Instantly share code, notes, and snippets.

View enolan's full-sized avatar

Echo Nolan enolan

View GitHub Profile
@enolan
enolan / gist:24c46674e21c7804ca1bd97958534dec
Last active February 4, 2022 22:51
GPT-3 abstract art titles
Abstract art titles generated with the OpenAI API. Everything up to "Love Separated by Lightyears" is mine,
the rest is generated. I made the list by starting with my titles, generating a completion, removing all the
titles and didn't like while leaving the good ones, and generating again. I did this three or four times I
think.
DaVinci model, temperature 1, top-p 0.95
-----
A Star Dies But Hope is Born
#/usr/bin/env bash
# Convert the XML output of malloc_info() into CSV for putting into a spreadsheet
echo -n "$(date -u '+%F %T' --date=$(basename $1)),"
XMLCMD="xmlstarlet sel -I -t -v"
echo -n "$($XMLCMD 'count(//malloc/heap)' $1),"
echo -n "$($XMLCMD '//malloc/system[@type="current"]/@size' $1),"
echo -n "$($XMLCMD '//malloc/total[@type="fast"]/@size' $1),"
echo -n "$($XMLCMD '//malloc/total[@type="rest"]/@size' $1),"
#!/usr/bin/env stack
-- stack --resolver lts-13.29 script --package regex-tdfa,conduit,bytestring,random-fu
-- Given a perf 'script', as emitted by 'perf script -i perf.data', subsample
-- at 0.1 probability to make the script small enough to load into e.g.
-- speedscope.
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-}
import Conduit
@enolan
enolan / default.nix
Created March 2, 2019 21:41
Nix derivation for RimWorld
with import <nixpkgs> {};
stdenv.mkDerivation {
name = "Rimworld-2150";
src = requireFile {
name = "RimWorld1-0-2150Linux.zip";
sha256 = "41f50499a8e39d11fa1eebfc3c5ae3e12a064b92f5a8af55680373b0aed6d81c";
message = "dude download the thing";
};
buildInputs = [autoPatchelfHook unzip gcc-unwrapped gtk2-x11 gdk_pixbuf glib];# libglvnd

Keybase proof

I hereby claim:

  • I am enolan on github.
  • I am enolan (https://keybase.io/enolan) on keybase.
  • I have a public key ASDmhKeVmn1_S7L6MqdTyJHph_95THOYiMIfhkulkVKCZwo

To claim this, I am signing this object:

@enolan
enolan / gist:054bac17dde53ea0e139945c29c8ddb5
Last active March 13, 2017 23:59
Put your homework solutions here!
If you'd like to share your solution to the homework, please paste it as a comment here and we'll look at it.
It's totally okay if you got stuck.
URL: https://git.io/vyiE8
@enolan
enolan / jobs-finished.sh
Created March 4, 2017 02:05
Bash scripts for making a noise when a process finishes
# I often start some command that takes a while (compiling, building containers, model training),
# then go and fuck around on the internet while waiting for it to finish. These scripts play the
# SCV "job's finished" sample from StarCraft when the process exits :)
# Usage:
# $ thing-that-takes-a-while ; talk
# Or, if you realize the thing's going to take a while after it starts:
# $ waitprocess $PID
@enolan
enolan / gist:5820f9c504aabba17e83ce612c75ddc5
Created February 10, 2017 04:06
vagrant up failure for calagator
enolan at behemoth in ~/mystuff/code/calagator [master]
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'ubuntu/trusty64' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Loading metadata for box 'ubuntu/trusty64'
default: URL: https://atlas.hashicorp.com/ubuntu/trusty64
==> default: Adding box 'ubuntu/trusty64' (v20170202.1.0) for provider: virtualbox
default: Downloading: https://atlas.hashicorp.com/ubuntu/boxes/trusty64/versions/20170202.1.0/providers/virtualbox.box
C:\Users\Echo\Desktop\temp> stack build --only-snapshot --prefetch --dry-run --verbose
Version 1.0.2 x86_64
2016-01-20 21:08:18.524518: [debug] Checking for project config at: C:\Users\Echo\Desktop\temp\stack.yaml @(stack_17sBDK7EAGnHgWa8uDWGI4:Stack.Config src/Stack\Config.hs:660:9)
2016-01-20 21:08:18.525518: [debug] Loading project config file stack.yaml @(stack_17sBDK7EAGnHgWa8uDWGI4:Stack.Config src/Stack\Config.hs:683:13)
2016-01-20 21:08:18.527518: [debug] Trying to decode C:\Users\Echo\AppData\Roaming\stack\build-plan-cache\x86_64-windows\lts-3.16.cache @(stack_17sBDK7EAGnHgWa8uDWGI4:Data.Binary.VersionTagged src/Data\Binary\VersionTagged.hs:55:5)
2016-01-20 21:08:18.541519: [debug] Success decoding C:\Users\Echo\AppData\Roaming\stack\build-plan-cache\x86_64-windows\lts-3.16.cache @(stack_17sBDK7EAGnHgWa8uDWGI4:Data.Binary.VersionTagged src/Data\Binary\VersionTagged.hs:64:13)
2016-01-20 21:08:18.542519: [debug] Trying to decode C:\Users\Echo\AppData\Roaming\stack\indices\Hackage\00-index.cache @(stack
# For more information, see: http://docs.haskellstack.org/en/stable/yaml_configuration.html
# Specifies the GHC version and set of packages available (e.g., lts-3.5, nightly-2015-09-21, ghc-7.10.2)
resolver: lts-4.2
# Local packages, usually specified by relative directory name
packages:
- '.'
# Packages to be pulled from upstream that are not in the resolver (e.g., acme-missiles-0.3)