Skip to content

Instantly share code, notes, and snippets.

Avatar

John Eriksson ranbogmord

  • Provide IT
  • Gothenburg, Sweden
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am ranbogmord on github.
  • I am ranbogmord (https://keybase.io/ranbogmord) on keybase.
  • I have a public key ASCiWC8eh3zkR758-SpmJmiHoED5iijXWQWU8PcetZVkhwo

To claim this, I am signing this object:

View structure.json
{
"id": 12345,
"regnumber":"ABC123",
"brand":"KIA",
"model":"CEED",
"year": 2013,
"assurance_id": "GPV",
"assurance_subtype":"STANDARD",
"assurance_status": "ACTIVE",
"created":"2014-03-12",
View main.py
import os
from subprocess import *
import re
proc = Popen('amidi -p hw:1 --dump', shell=True, stdout=PIPE)
def create_grid(size):
grid = []
for i in range(0, size):
newarr = []
@ranbogmord
ranbogmord / blinker.py
Created Dec 6, 2015
Blink random lights
View blinker.py
from subprocess import call
from time import sleep
from random import randint
device_name = "hw:1"
loop_through = [
00, 01, 02, 03, 04, 05, 06, 07,
10, 11, 12, 13, 14, 15, 16, 17,
20, 21, 22, 23, 24, 25, 26, 27,
@ranbogmord
ranbogmord / blinker.py
Created Dec 6, 2015
Blinks lights on a Launchpad Mini
View blinker.py
from subprocess import call
from time import sleep
from random import randint
device_name = "hw:1"
loop_through = [
00, 01, 02, 03, 04, 05, 06, 07,
10, 11, 12, 13, 14, 15, 16, 17,
20, 21, 22, 23, 24, 25, 26, 27,
@ranbogmord
ranbogmord / main.py
Created Dec 6, 2015
Read Launchpad Mini signals
View main.py
import os
from subprocess import *
import re
proc = Popen('amidi -p hw:1 --dump', shell=True, stdout=PIPE)
def create_grid(size):
grid = []
for i in range(0, size):
newarr = []
View net1stacktrace
[InvalidOperationException: Circular reference found for content type: 'Net1EPi.Models.Pages.LandingPage']
EPiServer.DataAbstraction.TypeReferenceAnalyzer.ValidateCircularReference(Type type, Type typePropertiesNeedsToInheritFrom, List`1 usedTypes) +560
EPiServer.DataAbstraction.TypeReferenceAnalyzer.ValidateCircularReference(Type type, Type typePropertiesNeedsToInheritFrom, List`1 usedTypes) +341
EPiServer.DataAbstraction.TypeReferenceAnalyzer.ValidateCircularReference(Type type, Type typePropertiesNeedsToInheritFrom, List`1 usedTypes) +341
EPiServer.DataAbstraction.TypeReferenceAnalyzer.Analyze(Type type) +132
EPiServer.DataAbstraction.DefaultContentTypeRepository.ValidateModelType(ContentType contentType) +165
EPiServer.DataAbstraction.DefaultContentTypeRepository.Save(ContentType contentType) +117
EPiServer.DataAbstraction.RuntimeModel.ContentTypeSynchronizer.CreateType(ContentTypeModel contentModel) +212
EPiServer.DataAbstraction.RuntimeModel.ContentTypeModelRegister.CommitTypes(B
@ranbogmord
ranbogmord / index.php
Created May 21, 2014
konvert() for Rebecca
View index.php
$swe = array('Vit', 'Svart', 'Gul', 'Orange', 'Röd', 'Rosa', 'Lila', 'Blå', 'Grön', 'Brun');
function konvert($fargval, $lang){
if (in_array($fargval, $swe)) {
$y=count($swe);
for ($x=0;$x<$y;$x++) {
if($fargval==$swe[$x]) {
echo "<br /><center>" . $fargval . " = " . "$lang[$x]" . "<br /></center>";
}
}