I hereby claim:
- I am k0d on github.
- I am markolsson (https://keybase.io/markolsson) on keybase.
- I have a public key whose fingerprint is 3869 0E64 0034 028F A47E A8BD 1008 538F A243 4963
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# Copyright (C) 2016 Telldus Technologies AB. All rights reserved. | |
import socket, re, sys | |
UDPSock = socket.socket(socket.AF_INET,socket.SOCK_DGRAM) | |
UDPSock.setsockopt(socket.SOL_SOCKET,socket.SO_BROADCAST,1) | |
UDPSock.setblocking(1) |
<?php | |
abstract class AbstractWriter implements Writer { | |
protected $counter = 0; | |
public function write( $file, $message ) { | |
$fp = fopen( $file, 'a' ); | |
fwrite( $fp, $message . "\r\n" ); |
/etc/puppet/hiera.yaml | |
--- | |
:backends: | |
- yaml | |
:hierarchy: | |
- %{clientcert} | |
- %{environment} | |
- common | |
:yaml: |
node nodename { | |
class { "dns::server": | |
master_zones => { | |
'zone1' => ['192.168.0.208','192.168.0.209', '192.168.105.225', '192.168.105.201'], | |
'zone2' => [], | |
'168.192.in-addr.arpa' => [], | |
}, | |
} | |
} |
import crypt | |
def check(username, password): | |
data = f.read().split("\n") | |
for line in data: | |
if line.startswith(username + ':'): | |
foundUser = line | |
break | |
user, t, salt, hashed = foundUser.split('$') | |
return crypt.crypt(password, '$6$%s$' % salt) == '$6$%s$%s' % (salt, hashed) |
import usb.core | |
from binascii import unhexlify as hex2lamp | |
def set_color(color): | |
print 'Attempting to set color to %s' % color | |
colors = dict(red='ff0000', green='00ff00', blue='0000ff') | |
if color not in colors: | |
print 'Color %s not found' % color | |
return False | |
else: |
#!/usr/bin/env python | |
#encoding:UTF-8 | |
import cherrypy | |
import redis | |
class Root(object): | |
redis = redis.StrictRedis(host='localhost', port=6379, db=0) | |
def counter(self): |