Skip to content

Instantly share code, notes, and snippets.

View maxnordlund's full-sized avatar

Max Nordlund maxnordlund

View GitHub Profile
@maxnordlund
maxnordlund / 03.make.log
Created October 17, 2012 17:52
Log file 03.make from brew
/bin/sh ./libtool --tag=CXX --mode=compile /usr/bin/g++-4.2 -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"smpeg\" -DVERSION=\"0.4.5\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -I/usr/local/opt/cairo/include -I/usr/local/opt/pixman/include -I/usr/local/opt/gettext/include -Os -w -pipe -march=core2 -msse4.1 -mmacosx-version-min=10.6 -fexpensive-optimizations -fomit-frame-pointer -D_GNU_SOURCE=1 -D_THREAD_SAFE -I/usr/local/include/SDL -DTHREADED_AUDIO -DNDEBUG -Wall -I.. -DNOCONTROLS -I. -I./audio -I./video -fno-exceptions -fno-rtti -c -o MPEG.lo MPEG.cpp
/bin/sh ./libtool --tag=CXX --mode=compile /usr/bin/g++-4.2 -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"s
@maxnordlund
maxnordlund / docker-build.log
Created September 25, 2014 13:00
Docker build golang:1.3.1-cross
Step 0 : FROM golang:1.3.1
---> dc9aa239dfe6
Step 1 : ENV GOLANG_CROSSPLATFORMS darwin/386 darwin/amd64 dragonfly/386 dragonfly/amd64 freebsd/386 freebsd/amd64 freebsd/arm linux/386 linux/amd64 linux/arm nacl/386 nacl/amd64p32 netbsd/386 netbsd/amd64 netbsd/arm openbsd/386 openbsd/amd64 plan9/386 plan9/amd64 solaris/amd64 windows/386 windows/amd64
---> Running in d7395afc59ef
---> 7925265e7d77
Removing intermediate container d7395afc59ef
Step 2 : ENV GOARM 5
---> Running in b220fdc34575
---> 46cdea8dc268
Removing intermediate container b220fdc34575
@maxnordlund
maxnordlund / asdq-2015.user.js
Last active August 29, 2015 14:13
ASDG 2015 Schedule hack
// ==UserScript==
// @match https://gamesdonequick.com/schedule
// ==/UserScript==
(function(style){
var sheet, element = document.createElement("style")
document.head.appendChild(element)
sheet = element.sheet
$$("tbody td:first-child:not([colspan])").forEach(function use24hclock(td) {
td.textContent = moment(td.textContent, "hh:mm a").format("HH:mm")
})
function markAired() {
var date, i, style, td, tr,
tds = Array.from(document.querySelectorAll(
"tbody td:first-child:not([colspan])"
))
@maxnordlund
maxnordlund / syncron.js
Last active August 22, 2016 21:03
A nano framework for synchronized DOM updates
(function() {
var consoleError,
renderLoop,
queue = [],
rAF = window.requestAnimationFrame || function(fn) {
setTimeout(fn, 0)
}
if (typeof console === "object" &&
typeof console.error === "function") {
@maxnordlund
maxnordlund / python2.log
Created October 5, 2016 20:42
Pillow 3.4.1 test logs
......................................................................................................SSSSSSSSSSSSSSSSSSSSSSSSSS..........................................SS........................SS......................................................................................................................................SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS.............................................................................................S..S.....................................................................................................................................................................................................................F...................................................................................................................................S..................S....SSSSSS...SSSSSS.........................................................SSSSSSSSSSSSSSSSSSSS....................................................................................S....S..
@maxnordlund
maxnordlund / multiple-inheritance.js
Last active December 18, 2016 11:10
Multiple inheritance in JavaScript
export default function createMixinFrom(...classes) {
let proto = Object.create(null)
function AnonymousMixinClass(...parameters) {
let proto = Object.getPrototypeOf(this)
// Run all super class constructors in order they were given.
// *This doesn't work without babel, sadly, because classes can't be called
// with an user supplied context*
classes.forEach(klass) => {
@maxnordlund
maxnordlund / default_list.py
Created March 14, 2017 13:36
Default list in python, á la defaultdict.
class DefaultList(list):
"""
List that always returns a value
If you try to access an missing index, it will fill up this list with
empty lists for all missing indices before returning the requested
index. This will be the last element since lists are ordered.
A consequence of this is that `for` loops over this list will never
stop.
@maxnordlund
maxnordlund / horizontal-ruler-with-caption.scss
Last active March 30, 2017 14:39
Pure CSS for `hr` element with caption
$size: 1rem;
$background: white;
hr[title] {
line-height: 0;
&::after {
background: $background;
content: attr(title);
@maxnordlund
maxnordlund / method_reflection.py
Last active April 20, 2017 15:36
Get the defining class for a unbound method in Python
def get_class(method):
"""
Get the class that the defined the provided method.
In Python 3 the concept of unbound method is removed and raw method
references are just plain functions. But it is sometimes useful to get the
class that defined that method. Unfortunately that turns out to be hard.
But there is a sure fire way of doing it, because Python exposes the
variables that a method can access, which by definition includes the
surronding class, so just go through that and find the class.
Of course it's not quite that simple. First off to find the class we check