Skip to content

Instantly share code, notes, and snippets.

@saihtaM
saihtaM / epicrepeat.pl
Created March 6, 2014 23:50
Irssi script: Epic repeat!!
use Irssi;
use vars qw($VERSION %IRSSI);
$VERSION = "1.0";
%IRSSI = (
authors => "Mathias F. Svendsen",
contact => "#Mathias @ irc.QuakeNet.org",
name => "Epic repeat!!",
description => "A quick command, to repeat commands!",
license => "GPL",
url => "http://okey.dk/"
@saihtaM
saihtaM / spotify_link.mrc
Created June 29, 2014 17:45
Click on link with Spotify URI in your mIRC client. Uses DDE ( http://www.mirchelp.net/helpfile/dde.htm ) for talking directly with Spotify
@saihtaM
saihtaM / komogvind_nowait.user.js
Last active August 29, 2015 14:08
These are my public userscripts - Click on "Raw" to install. They have all been tested with Greasemonkey for Firefox https://addons.mozilla.org/us/firefox/addon/greasemonkey/ - If enabled, they will auto update when I fix things.
// ==UserScript==
// @name KomogVind.dk Remove non-vip game loading wait times.
// @namespace http://www.komogvind.dk
// @description Fjerner banner reklamen, og sørger for at spillet indlæser hurtigst muligt.
// @downloadURL https://gist.githubusercontent.com/saihtaM/b667a0f5d08a16633f3b/raw/komogvind_nowait.user.js
// @icon https://i.imgur.com/6Pxv6j6.gif
// @include http://www.komogvind.dk/spil/play.php*
// @version 1.4
// ==/UserScript==

Keybase proof

I hereby claim:

  • I am saihtaM on github.
  • I am saihtam (https://keybase.io/saihtam) on keybase.
  • I have a public key whose fingerprint is 5362 FC8C B667 3EC8 8690 8B11 B81D 6582 AB19 F018

To claim this, I am signing this object:

@saihtaM
saihtaM / doorbell.lua
Last active August 29, 2015 14:15
My ESP8266 NodeMcu Lua scripts.. I'll just usually only use init.lua, but you can do whatever you want.
-- GET request on input, https://gist.github.com/saihtaM/35681a39385fbbd92974
-- I use this on my doorbell, but I have a little mic module that returns 3V on GPIO2 when a high sound is detected. That little mic module is hidden inside the doorbell.
-- This way, if the power is out. My doorbell stil works, and I don't have to think about killing my ESP8266 due to the voltage spikes that my doorbell is so happy to spit out (according to my multimeter).
pin = 4 -- 3 = GPIO0, 4 = GPIO2
firstrun = true
gpio.mode(pin,gpio.INPUT)
function pinsendrequest()
print("Sending request")
@saihtaM
saihtaM / pprint.py
Created July 2, 2012 03:55
Dumping variables
import pprint
pprint.pprint(globals())
pprint.pprint(locals())
@saihtaM
saihtaM / TimeForTv.py
Created November 1, 2012 15:20
Get TimeFor.TV XMLTV downloaded and inserted into EyeTV (Danish)
#!/usr/bin/python
# coding=utf-8
# Name: Script for downloading XMLTV and inserting it into EyeTV on Mac OS X.
# Requirements: Mac OS X, Python, EyeTV & TimeFor.TV Pro user.
# crontab -e suggestion: 0 6 * * * /Users/USER/TimeForTv.py
# Web/manual: http://okey.dk/?p=311
# Pro-tip: Lad vær med at skrive .py i fil navnet for at få Mac til at automatisk åbne terminalen, i stedet for evt. IDE tools du har.
# Copyright Mathias F. Svendsen - okey.dk
import urllib2, os, subprocess, time
@saihtaM
saihtaM / named.conf
Created November 18, 2012 08:22
BIND Config adblock
zone "101com.com" { type master; notify no; file "null.zone.file"; };
zone "101order.com" { type master; notify no; file "null.zone.file"; };
zone "103bees.com" { type master; notify no; file "null.zone.file"; };
zone "123banners.com" { type master; notify no; file "null.zone.file"; };
zone "123found.com" { type master; notify no; file "null.zone.file"; };
zone "123pagerank.com" { type master; notify no; file "null.zone.file"; };
zone "180hits.de" { type master; notify no; file "null.zone.file"; };
zone "180searchassistant.com" { type master; notify no; file "null.zone.file"; };
zone "180solutions.com" { type master; notify no; file "null.zone.file"; };
zone "1x1rank.com" { type master; notify no; file "null.zone.file"; };
@saihtaM
saihtaM / reboot.reg
Created April 4, 2013 11:56
Windows auto-shutdown/reboot.
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]
"MicrosoftPorn"="shutdown.exe /r /l /f /c /t:0 \"Windows update\""
@saihtaM
saihtaM / Adding 'Home Movies' (success - SAME FOLDER)
Last active December 18, 2015 13:09
(Log file) Cannot add anything else than 'Home Movies' in Plex Media Server Linux
Jun 15, 2013 10:57:02 [0x7f7e93fff700] DEBUG - Request: GET /system/agents?mediaType=1 [192.168.x.125:61597] (4 live)
Jun 15, 2013 10:57:02 [0x7f7e93fff700] DEBUG - * mediaType => 1
Jun 15, 2013 10:57:02 [0x7f7e93fff700] DEBUG - [com.plexapp.system] Sending command over HTTP (GET): /system/agents?mediaType=1
Jun 15, 2013 10:57:02 [0x7f7e93fff700] DEBUG - HTTP requesting to: http://127.0.0.1:53699/system/agents?mediaType=1
Jun 15, 2013 10:57:02 [0x7f7e9a7fc700] DEBUG - Request: GET /system/scanners/1 [192.168.x.125:61598] (5 live)
Jun 15, 2013 10:57:02 [0x7f7e9a7fc700] DEBUG - [com.plexapp.system] Sending command over HTTP (GET): /system/scanners/1
Jun 15, 2013 10:57:02 [0x7f7e9a7fc700] DEBUG - HTTP requesting to: http://127.0.0.1:53699/system/scanners/1
Jun 15, 2013 10:57:02 [0x7f7e93fff700] DEBUG - [com.plexapp.system] HTTP reply status 304, with 0 bytes of content.
Jun 15, 2013 10:57:02 [0x7f7e9a7fc700] DEBUG - [com.plexapp.system] HTTP reply status 304, with 0 bytes of content.
Jun 15, 2013 10:57:02 [0x7f