Skip to content

Instantly share code, notes, and snippets.

View fasmide's full-sized avatar

Kristian Mide fasmide

  • Aalborg, Denmark
View GitHub Profile
@fasmide
fasmide / DanskeBank.php
Created November 14, 2011 22:27
Danske Bank console app and php class
<?
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'),
#!/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
package main
import (
"fmt"
"log"
"net/http"
"net/url"
"os"
"strings"
@fasmide
fasmide / hdmi.py
Created December 23, 2013 23:01
Turns the hdmi port on and off by reading a PIR sensor off a raspberry pi GPIO port 11
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 / lampe.ino
Created September 4, 2016 02:18
fastled demoreel100 with rotary encoder
#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 / dba.php
Created November 9, 2011 12:37
Simpel kommunikation med DBA's api
<?
class DBA {
/**
example params:
'q' => 'yamaha mixer',
'ps' => 20,
'pn' => 1,
'f' => 'json',
'filters' => 1
*/