This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set-option -g status on | |
set -g terminal-overrides 'xterm*:smcup@:rmcup@,rxvt*:smcup@:rmcup@' | |
# Emacs add prefix as well, keep telnet escape as prefix. | |
unbind-key C-b | |
set-option -g prefix C-] | |
set-option -g prefix2 C-x | |
# Emacs window management keys | |
unbind-key -T prefix 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hashlib, hmac, base64, struct, time, math | |
def GoogleTOTP(s): | |
msg = int(math.floor(time.time()/30)) | |
hm = hmac.new(base64.b32decode(s), struct.pack('>q', msg), hashlib.sha1).digest() | |
offs = ord(hm[-1]) & 0xF | |
code = str(((struct.unpack('>L',hm[offs:offs+4])[0]) & 0x7FFFFFFF) % 1000000).zfill(6) | |
return code | |
print GoogleTOTP("") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!python | |
import RPi.GPIO as GPIO | |
import time | |
import sys | |
GPIO.setmode(GPIO.BOARD) | |
bint = 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys, time | |
id = 1234567890 | |
lfsr = 0xDEADBEEF | |
def lfsrN(lfsr, count): | |
#0b10101010101 | |
#0x80000417, 0b10000000 00000000 0000 0100 0001 0111 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import random, sys | |
def distribute(parts, value): | |
total = sum(parts) | |
min_value = len(parts) | |
if ((value < min_value) or (value > total)): | |
return None | |
cur = [1]*len(parts) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# DLink DIR-615 HW:T1 FW:20.07 status. | |
from sys import argv, exit | |
import urllib as u1 | |
import urllib2 as u2 | |
import bs4 | |
# Router IP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from subprocess import Popen, PIPE | |
import urllib2 | |
from time import sleep | |
p = Popen(['/sbin/apcaccess'], stdout=PIPE, stderr=PIPE) | |
(o, e) = p.communicate() | |
status = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys, json | |
from gi.repository import Notify | |
sys.path.append("paho-mqtt-1.2/src/") | |
import paho.mqtt.client as mqtt | |
def _on_connect(client, userdata, rc): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var bgw = document.getElementsByClassName("bgwrapper")[0]; | |
var fixed_spans = document.getElementsByClassName('fixed'); | |
var hint_boxen = document.getElementsByClassName('hintbox'); | |
bgw.style.backgroundColor = '#000'; | |
bgw.style.color = 'white'; | |
for (i in fixed_spans) { | |
var fs = fixed_spans[i]; | |
if (fs.style != undefined) fs.style.backgroundColor = '#222'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name OWA Link Unwrap | |
// @namespace http://userscripts.org/users/aniline | |
// @description Re-map links to actual target instead of through OWA servers. | |
// @author aniline | |
// @include http://*/owa/* | |
// @include https://*/owa/* | |
// @version 0.3 | |
// ==/UserScript== |