Skip to content

Instantly share code, notes, and snippets.

View roikiermedia's full-sized avatar

Thorben Dittmar roikiermedia

View GitHub Profile
var grid = [];
var colors = [
"#1D2B53",
"#7E2553",
"#AB5236",
"#5F574F",
"#83769C",
"#008751",
"#00E436",
"#29ADFF",
module.exports = function () {
return async context => {
context.result.datamodel = context.service.options.Model.schema;
};
};
@roikiermedia
roikiermedia / axios.js
Created January 5, 2019 18:24
set host & port for axios instance
// set host & port for axios instance
// https://github.com/nuxt-community/express-template/blob/master/template/plugins/axios.js
import * as axios from "axios";
let options = {};
// The server-side needs a full url to work
if (!process.browser) {
options.baseURL = `http://${process.env.HOST || "localhost"}:${process.env.PORT || 3000}`;
}
var system;
function setup() {
createCanvas(windowWidth, windowHeight);
frameRate(60);
pixelDensity(1);
system = new ParticleSystem(createVector(-20, height+80));
}
function draw() {
function FlashItem(parent,key,data,mime){this.p=parent;this.k=key;if(data){parent._store(key,data,mime);}}
FlashItem.prototype.pipe=function(res){this.p.pipe(this.k,res);}
FlashItem.prototype.toString=function(){var item=this.p.items[this.k];if(item===undefined){return null;}
return E.toString(this.p.flash.read(item.length,this.p.address(item.page)));}
FlashItem.prototype.module=function(){Modules.addCached(this.k,this.toString());return this.k;}
FlashItem.prototype.valueOf=function(){var s=this.toString();switch(this.p.items[this.k].mime){case'application/json':var s=JSON.parse(s);break;case'text/javascript':return s=eval(s);}
return s;}
exports=FlashItem;
var esp = require("ESP8266");
var pin = new Pin(NodeMCU.D6);
pinMode(pin, "output");
var striplength = 120;
var pixel = [
//G,R,B
0,0,0, // LED 0
@roikiermedia
roikiermedia / materialize-grid.css
Created April 30, 2016 14:45
materialize compiled grid
.container {
margin: 0 auto;
max-width: 1280px;
width: 90%;
}
@media only screen and (min-width: 601px) {
.container {
width: 85%;
#! /bin/bash
service nginx stop && ./letsencrypt-auto certonly --renew-by-default -d $DOMAIN && service nginx start