Skip to content

Instantly share code, notes, and snippets.

space wizard

Stian Veum Møllersen mollerse

space wizard
View GitHub Profile

Gratulerer med dagen, Marco!

Her er kildekoden til kortet ditt. For å kjøre den:

git clone
cd a64218593a12809adb9d3814adf63e58
npm i get-pixels ndarray ndarray-fill ndarray-scratch zeros
npx budo marco.js
mollerse / example.js
Last active Dec 6, 2019
Simple interface for controlling various parameters with MIDI and/or dat.gui
View example.js
import midiControl from "./midiControl.js";
const controls = midiControl("Launch Control MIDI 1");
function setProp(name, unit, v) {, `${v}${unit}`);
let setMarginXXS = setProp.bind(null, "--tv-margins-xxs", "px");
let setMarginXS = setProp.bind(null, "--tv-margins-xs", "px");
mollerse /
Last active Dec 12, 2018
Intro to perlin-noise


npm install -S canvas-sketch canvas-sketch-util simplex-noise

Save the code from sketch.js to a local file.


mollerse /
Last active Oct 31, 2018
Prolog solution(ish) to 6th grade logic puzzle
diff_known(X, Diff, Y):- Y is X + Diff.
abs_diff(X, Diff, Y):- Y is X + Diff ; Y is X - Diff.
older(X, Y):- X > Y.
drop_lie(Facts, Index, Truths):- nth0(Index, Facts, _, Truths).
% Prints program dropping a configuration of lies
print_program(L1, L2, L3):-
% Valid program:
mollerse / package.json
Last active Feb 22, 2018
Repro of stuff in node_modules/.bin disappearing with npm-ci
View package.json
"name": "npm-ci-repro",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "rm -rf node_modules package-lock.json && npm i && ls node_modules/.bin && npm ci && ls node_modules/.bin"
"keywords": [],
"license": "ISC",
mollerse / console-log.sublime-snippet
Created Mar 3, 2014
ST snippet for console.log('heia')
View console-log.sublime-snippet
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<!-- Optional: Set a scope to limit where the snippet will trigger -->
mollerse / gulpfile-express.js
Last active Mar 28, 2021
Gulpfile for livereload + static server
View gulpfile-express.js
var gulp = require('gulp'),
sass = require('gulp-sass'),
browserify = require('gulp-browserify'),
concat = require('gulp-concat'),
embedlr = require('gulp-embedlr'),
refresh = require('gulp-livereload'),
lrserver = require('tiny-lr')(),
express = require('express'),
livereload = require('connect-livereload')
livereloadport = 35729,
mollerse /
Created Aug 15, 2013
Pythonscript for track-change notifications in KDE
#!/usr/bin/env python
import dbus
import gobject
from dbus.mainloop.glib import DBusGMainLoop
import time
class SpotifyNotifier(object):
def __init__(self):