Skip to content

Instantly share code, notes, and snippets.

Avatar

Kristian Mide fasmide

  • Aalborg, Denmark
View GitHub Profile
@fasmide
fasmide / lampe.ino
Created Sep 4, 2016
fastled demoreel100 with rotary encoder
View lampe.ino
#include "FastLED.h"
FASTLED_USING_NAMESPACE
#define DATA_PIN 10
//#define CLK_PIN 4
#define LED_TYPE WS2812B
#define COLOR_ORDER GRB
#define NUM_LEDS 6
CRGB leds[NUM_LEDS];
@fasmide
fasmide / hdmi.py
Created Dec 23, 2013
Turns the hdmi port on and off by reading a PIR sensor off a raspberry pi GPIO port 11
View hdmi.py
import RPi.GPIO as GPIO
import time
from threading import Timer
import subprocess
GPIO.setmode(GPIO.BCM)
GPIO.setup(11, GPIO.IN)
timer = False
monitor_is_on = True
@fasmide
fasmide / dba.php
Created Nov 9, 2011
Simpel kommunikation med DBA's api
View dba.php
<?
class DBA {
/**
example params:
'q' => 'yamaha mixer',
'ps' => 20,
'pn' => 1,
'f' => 'json',
'filters' => 1
*/
View etordomdagen.go
package main
import (
"fmt"
"log"
"net/http"
"net/url"
"os"
"strings"
View usb-reset.sh
#!/bin/bash
SITES="dr.dk 1.1.1.1 8.8.8.8 google.com aau.dk tv2.dk"
ERRORSUM=0
for i in $SITES
do
ping -q -i 10 -c 10 ${i} &
done
@fasmide
fasmide / DanskeBank.php
Created Nov 14, 2011
Danske Bank console app and php class
View DanskeBank.php
<?
class DanskeBank {
private $_magicKey;
private $_curlHandle;
public function __construct()
{
$this->_curlHandle = curl_init();
$data = array(
'os' => 'Android', //hmmf tried with php_uname('s') but then the service rejects logins
'model' => php_uname('m'),
View carbergerv1.ino
#include "FastLED.h"
FASTLED_USING_NAMESPACE
// FastLED "100-lines-of-code" demo reel, showing just a few
// of the kinds of animation patterns you can quickly and easily
// compose using FastLED.
//
// This example also shows one easy way to define multiple
// animations patterns and have them automatically rotate.
View ikea_firmware_access_denied
GET /feed/version_info.json HTTP/1.0
User-Agent: HertzClient/1.0 (GW (1).(0).(4))
Host: fw.ota.homesmart.ikea.net
Connection: close
HTTP/1.1 403 Forbidden
Content-Type: application/xml
Connection: close
Date: Sun, 02 Apr 2017 14:44:58 GMT
Server: AmazonS3
View henrik.go
package main
import "fmt"
var k *string
func main() {
ko := string("Blarp")
k = &ko
go skriver("aaaaaa")
View weatherscrape.go
package main
import (
"fmt"
"log"
"regexp"
"strconv"
"time"
"github.com/PuerkitoBio/goquery"