Skip to content

Instantly share code, notes, and snippets.

View ejeklint's full-sized avatar

Per Ejeklint ejeklint

View GitHub Profile

Keybase proof

I hereby claim:

  • I am ejeklint on github.
  • I am ejeklint (https://keybase.io/ejeklint) on keybase.
  • I have a public key ASB6gBTg8MoWHlI90OElr89AJo8HOw-wiBtnd8GHIlR1wQo

To claim this, I am signing this object:

Verifying that +ejeklint is my blockchain ID. https://onename.com/ejeklint
var nano = require('nano')('http://blablabla/');
String.prototype.toUnderscore = function(){
return this.replace(/([A-Z])/g, function($1){return "_"+$1.toLowerCase();});
};
// For all meetings
nano.db.list(function(err, body) {
body.forEach(function(db) {
if (!db.match(/meeting\//)) {
@ejeklint
ejeklint / gist:4714653
Last active December 12, 2015 04:28
Squirrel code for controlling a LED strip with addressable LEDs using the almighty WS2801 driver.
//
// WS2810 RGB LED Driver Controller and Demo usage
//
//
// A selection of predefined colours. Add to taste.
//
enum Colour {
red = "\xff\x00\x00",
green = "\x00\xff\x00",
Det här lirar bra för normala personnummer:
(?:19|20)?\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])[-+]?\d{4}
Validerar det mesta men märker inte om februari har dag 30 eller 31. Har ni samordningsnummer med skulle jag förkrångla till
(?:19|20)?\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12678]\d|[39][01])[-+]?\d{4}
eller förenkla till
#!/bin/sh
#######################################################
# UNIX TREE #
# Version: 2.3 #
# File: ~/apps/tree/tree.sh #
# By Dem Pilafian #
# #
# Displays Structure of Directory Hierarchy #
# ------------------------------------------------- #
# This tiny script uses "ls", "grep", and "sed" #