Skip to content

Instantly share code, notes, and snippets.

I have a huge backlog of notifications, trying hard to work my way thru them!

Linus Unnebäck LinusU

I have a huge backlog of notifications, trying hard to work my way thru them!
View GitHub Profile
LinusU /
Created Oct 18, 2018
Information about the DSP-W115 Smart Plug


The deice creates an ad-hoc network that will be named DSP-W115-XXXX (where XXXX will be device dependent). When connecting to this network, my Smart Plug had the address, navigating to took me to a login page. The credentials for logging in were: username = Admin, password = pin code printed on device.

After logging in, the device presents a page with some current information about the device:

Firmware Version: 1.00-b11
Date: Nov 17, 2017
Checksum: 0x13A44B58
LinusU / generate.js
Last active Jul 29, 2018
Stripe TypeScript definition generation
View generate.js
const input = require('./spec3.json')
function titleCase(snake) {
return snake.replace(/(^|_)([a-z])/g, (s) => s.replace('_', '').toUpperCase())
function isPrimitive(schema) {
switch (schema.type) {
case 'boolean':
case 'number':
LinusU / react.swift
Last active Mar 6, 2018
React like renderer concept for Swift
View react.swift
import UIKit
import PlaygroundSupport
* Library Types *
protocol REElement {
func render() -> REElement?
LinusU / Makefile
Created May 21, 2016
Minimal CoreAudio line in example
View Makefile
clang++ -framework AudioToolBox -framework CoreFoundation -o line-in
View Github automerge
function run () {
var updateButton = document.querySelector('.branch-action-btn button')
var mergeButton = document.querySelector('.merge-message button')
if (!mergeButton.disabled) {
if (!updateButton.disabled) {
LinusU / grunt-cluster.js
Last active Aug 29, 2015
Node.js cluster together with Grunt
View grunt-cluster.js
var os = require('os');
var async = require('async');
var cluster = require('cluster');
if (cluster.isWorker) {
process.on('message', function (msg) {
// Do the Phantom JS stuff
LinusU / mongodb.diff
Last active Aug 29, 2015
Diff to get mongodb to compile on newer OS X 10.10
View mongodb.diff
diff --git a/src/third_party/s2/util/endian/endian.h b/src/third_party/s2/util/endian/endian.h
index 9def73f..9de7ab0 100755
--- a/src/third_party/s2/util/endian/endian.h
+++ b/src/third_party/s2/util/endian/endian.h
@@ -178,14 +178,5 @@ class LittleEndian {
-// This one is safe to take as it's an extension
-#define htonll(x) ghtonll(x)
LinusU / uuid-v5.js
Created Apr 30, 2014
UUID V5 Node.js
View uuid-v5.js
function uuid5(data) {
var out = crypto.createHash('sha1').update(data).digest();
out[8] = out[8] & 0x3f | 0xa0; // set variant
out[6] = out[6] & 0x0f | 0x50; // set version
var hex = out.toString('hex', 0, 16);
return [
hex.substring( 0, 8),
LinusU /
Last active Jun 29, 2020 — forked from apla/icons_and_splash.js
Icons and Splash images for your Cordova project. (with iOS 7 support)


Install cordova into node_modules

npm install cordova

Add icons_and_splash.js

LinusU / api.js
Last active Dec 28, 2015
Eligius javascript api, backed by jsonp.
View api.js
(function (window, document) {
'use strict';
var api = function (cmd, opts, cb) {
opts.cmd = cmd;
var id = 'APICB' + Math.round(Math.random() * 1e9),
You can’t perform that action at this time.