Skip to content

Instantly share code, notes, and snippets.

View futuro's full-sized avatar

Evan Niessen-Derry futuro

  • St. Paul, MN
  • 17:30 (UTC -05:00)
View GitHub Profile
@futuro
futuro / post-merge
Created August 27, 2015 15:41
Post-merge hook which fixes perms inside the puppet directory. This was a work-around for the fact that I had to clone puppet repos as root, but they had to run as the puppet user.
#!/bin/bash
# Get some helper functions
. git-sh-setup
# Go to the toplevel of the git directory
cd_to_toplevel
# If we're in the puppet modules, run the following, since they're specific to puppet
if [[ "$PWD" == "/etc/puppet/environments/production/modules"* ]]
then
;;; Example implementation of a character list
(define chr_list '(#\w #\h #\a #\t))
;;; Helper function to make reversing easy
(define (rev list)
(pushonto list '()))
;;; Function that does all of the work
(define (pushonto list1 list2)
;; If the first list is empty, return the second
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
typedef enum { false, true } bool;
char charlist[] = "Some text."; /* An example character list */
char* reverse(char *char_list)
{
@futuro
futuro / project_ideas.org
Last active August 29, 2015 13:57
some MC project ideas

Mod Features

  • Artifice
  • BiblioCraft
  • Blood Magic
  • BuildCraft
  • Carpenter’s Blocks
  • ComputerCraft
  • Dimensional Doors
  • EnderStorage
  • Forestry
@futuro
futuro / hello-world
Created January 11, 2015 04:07
hello-world program to show xlib:open-font problems with 9x15bold
(defun hello-world (width height &optional (host ""))
(let* ((display (xlib:open-display host))
(screen (first (xlib:display-roots display)))
(black (xlib:screen-black-pixel screen))
(white (xlib:screen-white-pixel screen))
(root-window (xlib:screen-root screen))
(grackon (xlib:create-gcontext
:drawable root-window
:font "9x15bold"
:foreground white
@futuro
futuro / README.md
Last active August 29, 2015 14:14
An introduction to underscore.js that can be used with repl.it
  1. Copy and paste underscore.js into repl.it, and execute it.

  2. Clear that text, then copy/paste whatever you find relevant from intro-to-underscore.js, probably starting with the data structures. Some of the later functions rely on previous work, so keep that in mind if you like to skip around.

@futuro
futuro / gist:84fd81d07369f78941cc
Created March 3, 2015 04:14
wikibrain loader output
This file has been truncated, but you can view the full file.
running:
org.wikibrain.Loader -l simple -s fetchlinks -s download -s dumploader -s redirects -s wikitext -s lucene -s phrases -s concepts -s universal -s wikidata -s spatial -s sr -c customized.conf
Mar 02, 2015 8:30:28 PM org.wikibrain.Loader <init>
INFO: pipeline keeping args: [-l, simple, -c, customized.conf]
Mar 02, 2015 8:30:28 PM org.wikibrain.core.lang.Language loadAllLanguages
INFO: loaded 285 languages
Mar 02, 2015 8:30:31 PM org.wikibrain.conf.Configurator registerProviders
INFO: configurator installed 70 providers for 37 classes
@futuro
futuro / dissoc-in.clj
Created July 22, 2015 03:08
A little snippet on how to remove nested maps with dissoc-in from core.incubator
wikiparse.core> tstmap
{:front {:middletwo "m2", :middlethree "m3", :middleone :m1}, :back2 "b2", :back1 :b1}
wikiparse.core> (clojure.core.incubator/dissoc-in tstmap [:front :middletwo])
{:front {:middlethree "m3", :middleone :m1}, :back2 "b2", :back1 :b1}
!! Fix the Alt-p is wacko char problem.
XTerm*eightBitInput: false
XTerm*metaSendsEscape: true
"""Define names for all type symbols known in the standard interpreter.
Types that are part of optional modules (e.g. array) are not listed.
"""
import sys
# Iterators in Python aren't a matter of type but of protocol. A large
# and changing number of builtin types implement *some* flavor of
# iterator. Don't check the type! Use hasattr to check for both
# "__iter__" and "next" attributes instead.