Skip to content

Instantly share code, notes, and snippets.

space wizard

Stian Veum Møllersen mollerse

space wizard
Block or report user

Report or block mollerse

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
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 Jun 25, 2019
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):
You can’t perform that action at this time.