I hereby claim:
- I am stenius on github.
- I am griff (https://keybase.io/griff) on keybase.
- I have a public key whose fingerprint is 5A4B 76AD E362 F047 2E18 A4EC 39D2 F995 B462 0197
To claim this, I am signing this object:
('table#bal_out tr').delegate('td','click', (function(){ | |
cell = jQuery(this); | |
row = $(this).closest('tr'); | |
oldValue = cell.html(); | |
rowId = jQuery(row).attr('id'); | |
headerId= cell.closest('table').find('th').eq(cell.index()).attr('id'); | |
if (oldValue.indexOf('button') == -1) |
import serial | |
import datetime | |
ser = serial.Serial('/dev/ttyUSB0', 2400, timeout=1) | |
count = 0 | |
read_time = datetime.datetime.now() | |
last_read = 'asdfasdf' #trash string so initial comparison fails | |
while True: | |
line = ser.readline() | |
if len(line) > 1: |
I hereby claim:
To claim this, I am signing this object:
import requests | |
for x in [80, 443, 22, 21, 8080, 25, 4567, 1723, 53, 23, 3389, 110, 135, 143, | |
5000, 8081, 445, 139, 10000, 1863, 111, 1025, 81, 1026, 8000, 1027, 5060, | |
1028, 1029, 7676, 389, 1050, 113, 1024, 587, 30005, 20, 4444, 37, 27374, | |
5678, 56789, 1002, 18067, 30722, 554, 4664, 8594, 29860, 4]: | |
try: | |
r = requests.get('http://portquiz.net:%s' % x, timeout=5) | |
except requests.exceptions.Timeout: | |
continue |
class Node: | |
def __init__(self, value, parent): | |
self.value = value | |
self.parent = parent | |
def ancestors(node): | |
# return all parent nodes including this node | |
ancestor_nodes = [] | |
ancestor_nodes.append(node) | |
parent = node.parent |
# check depth of keys | |
# | |
a = { | |
'key1': 1, | |
'key2': { | |
'key3': 1, | |
'key4': { | |
'key5': 4 | |
} | |
} |
import json | |
import boto3 | |
import os | |
from __future__ import print_function | |
from email.parser import Parser | |
os.environ['AWS_DEFAULT_REGION'] = 'us-east-1' | |
# this is the email address you want the inbound mail forwarded to |
from athena.classes.module import Module | |
from athena.classes.task import ActiveTask | |
from athena.apis import api_lib | |
from mpd import MPDClient | |
client = MPDClient() | |
client.connect("192.168.0.150", 6600) | |
class PauseSongTask(ActiveTask): | |
def __init__(self): |
debconf-utils: | |
pkg.installed | |
base: | |
pkgrepo.managed: | |
- humanname: Unoffical Java PPA | |
- name: deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main | |
- dist: precise | |
- file: /etc/apt/sources.list.d/java.list | |
- keyid: EEA14886 |
/etc/consul.d: | |
file.directory: | |
- user: root | |
- group: adm | |
- mode: 0755 | |
/etc/consul.d/client: | |
file.directory: | |
- user: root | |
- group: adm |