Skip to content

Instantly share code, notes, and snippets.

View fasmide's full-sized avatar

Kristian Mide fasmide

  • Aalborg, Denmark
View GitHub Profile
var hat = function() {
if(this === hat) {
console.log("Jeg er ens");
} else {
console.log("Jeg er en anden");
}
}
hat();
<?php
class Q {
public function __construct() {
$this->hej();
}
}
class B extends Q {
public function hej() {
echo "hej ";
@fasmide
fasmide / reaktion.ino
Created August 22, 2014 10:11
reaktion
#include <Bounce2.h>
#include <LiquidCrystal.h>
#define LARGEBTN 10
#define SMALLBTN 11
#define BUZZER 9
//Bounce largeBouncer = Bounce( LARGEBTN, 35 );
Bounce largeBouncer = Bounce();
@fasmide
fasmide / kamstrup.nut
Created May 13, 2014 21:13
Kamstrup with sleep and nvram storage
local units = ["", "Wh", "kWh", "MWh", "GWh", "j", "kj", "Mj",
"Gj", "Cal", "kCal", "Mcal", "Gcal", "varh",
"kvarh", "Mvarh", "Gvarh", "VAh", "kVAh",
"MVAh", "GVAh", "kW", "kW", "MW", "GW",
"kvar", "kvar", "Mvar", "Gvar", "VA", "kVA",
"MVA", "GVA", "V", "A", "kV", "kA", "C",
"K", "l", "m3", "l/h", "m3/h", "m3xC",
"ton", "ton/h", "h", "hh:mm:ss", "yy:mm:dd",
"yyyy:mm:dd", "mm:dd", "", "bar", "RTC",
"ASCII", "m3 x 10", "ton x 10", "GJ x 10",
@fasmide
fasmide / trello.applescript
Last active August 29, 2015 14:00
Poormans quicktrail
on run {input, parameters}
set incoming_card to text returned of (display dialog "Incoming trello" default answer "")
do shell script "mail -s " & quoted form of incoming_card & " __EXCHANGE_WITH_INCOMING_TRELLO_MAIL__ < /dev/null"
return input
end run
@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 / antifacerape.ino
Last active December 27, 2015 01:48
box
#include <Bounce.h>
#include <LiquidCrystal.h>
#define LARGEBTN 10
#define SMALLBTN 11
#define BUZZER 9
Bounce largeBouncer = Bounce( LARGEBTN, 35 );
Bounce smallBouncer = Bounce( SMALLBTN, 5);
LiquidCrystal lcd(2, 3, 4, 5, 6, 7, 8);
From nobody Fri Apr 27 09:58:18 2012
Received: by 10.50.76.133 with SMTP id k5mr1623118igw.2.1335520697251;
Fri, 27 Apr 2012 02:58:17 -0700 (PDT)
Return-Path: <kristian@mide.dk>
Received: from mail-iy0-f177.google.com (mail-iy0-f177.google.com
[209.85.210.177])
by gmr-mx.google.com with ESMTPS id t9si964354igb.1.2012.04.27.02.58.17
(version=TLSv1/SSLv3 cipher=OTHER);
Fri, 27 Apr 2012 02:58:17 -0700 (PDT)
Received-SPF: neutral (google.com: 209.85.210.177 is neither permitted nor
<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<map>
<string name="KEY_DEVICE_IDENTIFIER">08c24947.. muh ..95cd3</string>
</map>
@fasmide
fasmide / dropfeed.php
Created January 23, 2012 10:32
Use this feed togeather with GeekTool - allows you to monitor your dropbox's activity
<?php
/**
* You can find your feed url at http://dropbox.com/events
* The buttom of the page has a Subscribe to feed feature.
*
* Copyright (c) 2012 Kristian Mide
*
* MIT License
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy,