Skip to content

Instantly share code, notes, and snippets.

View kelexel's full-sized avatar

Rudolph Sand kelexel

View GitHub Profile
# add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
if ($http_origin ~* ^http(?:s)*?://(?:w[0-9]-)*(?:ovh-cache|ovh-cdn|manager|push|cache|cdn).*(?:domain\.net)(?::[0-9]+)? ) {
set $cors 'true';
}
# test for empty variables will default to 'testtrue'
@kelexel
kelexel / ESPLedDriver.cpp
Last active November 16, 2016 16:14 — forked from anonymous/ESPLedDriver.cpp
How to reference Class methods in a Struct ?
void ESPLedDriver::colorwaves()
{
// ...
}
void ESPLedDriver::palettetest()
{
// ...
}
void ESPLedDriver::setPatterns()
@kelexel
kelexel / FiberOpticLamp.ino
Created October 11, 2016 00:59 — forked from AdySan/FiberOpticLamp.ino
Philips Hue Clone using ESP8266
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266mDNS.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>
#include <PubSubClient.h>
#include <Adafruit_NeoPixel.h>
#define PIN D8
Adafruit_NeoPixel strip = Adafruit_NeoPixel(6, PIN, NEO_GRB + NEO_KHZ800);
@kelexel
kelexel / ESP_Plasma.ino
Created October 11, 2016 00:59 — forked from AdySan/ESP_Plasma.ino
ESP8266/Arduino Plasma effect demo using esp8266-oled-ssd1306 library.
#include <Wire.h>
#include "SSD1306.h"
#define SET_BIT_HIGH(__mem, __x, __y) \
__mem[x + (y >> 3)*128] |= _BV( y - ((y >> 3) << 3) )
static const uint8_t sinustable[ 0x100 ] = {
0x80, 0x7d, 0x7a, 0x77, 0x74, 0x70, 0x6d, 0x6a,
0x67, 0x64, 0x61, 0x5e, 0x5b, 0x58, 0x55, 0x52,
0x4f, 0x4d, 0x4a, 0x47, 0x44, 0x41, 0x3f, 0x3c,
@kelexel
kelexel / history.js
Last active August 29, 2015 14:10
Updating History.js for Mootools 1.5.1
/*
---
name: History
description: History Management via popstate or hashchange.
authors: Christoph Pojer (@cpojer)
license: MIT-style license.
@kelexel
kelexel / gist:8950448
Created February 12, 2014 05:22
Robot Brain 0.1
// Robot Brain v0.1
//
// kelexel@github
//
// this sketch is meant to control the robotbase dual h-bridge
// http://www.seeedstudio.com/depot/datasheet/L298%20Dual%20H-Bridge%20Motor%20Driver%20datasheet.pdf
// the bot has a seeeduino, an xbee shield and xbee serie2
// right now the remote control is just an xbee plugged to a pc.
// Motors