Usage:
check_keys.py hosts [<FILE>]
check_keys.py key [<FILE>...]
check_keys.py github <user>
$ check_hosts.py github cagerton
[
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 python2.7 | |
"""Usage: fetch_hostkey.py <host> [<port>]""" | |
import paramiko, docopt | |
opt = docopt.docopt(__doc__) | |
host = opt['<host>'] | |
port = int(opt['<port>'] or 22) | |
t = paramiko.Transport((host, port)) | |
t.connect() |
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
from flask import Flask, redirect, render_template, url_for, request | |
from flask_bootstrap import Bootstrap | |
import redis | |
import json | |
app = Flask(__name__) | |
Bootstrap(app) | |
r = redis.Redis() | |
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
//MOSI: | |
#define DATAOUT 11 | |
//MISO: (not used, but part of builtin SPI) | |
#define DATAIN 12 | |
#define SPICLOCK 13 | |
#define SLAVESELECT 10 | |
#define LDAC 8 | |
void setup() { | |
byte clr; |
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
# Steps to monitor who removes you from their friends list on facebook: | |
# Grab the new Facebook Python-SDK from github. | |
# Modify & run the appengine+oauth example/demo as follows: | |
# -in facebookoauth.py define _parse_json & _dump_json | |
# -in user add two db.TextProperty fields: friends, unfriends | |
# -swap the HomeHandler class for below... | |
# -update template to display as desired. | |
# run & reload every few days and see who doesn't like you anymore. | |
class HomeHandler(BaseHandler): |
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
def publish_to_wall(user,unfriend): | |
"""Prints out a pretty unfriends notice""" | |
logging.info('Posting message to %s' % user.id) | |
args = {'access_token':user.access_token, | |
'message':'is no longer friends with %s.' % (unfriend['name']), | |
'picture':'http://graph.facebook.com/%s/picture' % unfriend['id'], | |
'link':'http://drama-lama.appspot.com', | |
'description': 'DramaLama - the unfriending monitor.', | |
} | |
post_args = urllib.urlencode(args) |
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
def ones(x): | |
if x: | |
print "1", | |
return ones(x-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
# Run this command to check your ssh fingerprint. | |
ssh-keygen -l -f ~/.ssh/*.pub |
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 socket | |
import time | |
from math import pi, sin | |
UDP_IP = '192.168.2.2' | |
UDP_PORT = 9897 | |
def Push(messages): | |
"""Stolen from: https://github.com/robot-head/PixelPusher-python""" | |
assert type(messages) == list |
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
#!yaml | |
# | |
# Postgres 9.3 packages salt state | |
# | |
# Created 9/9/13 | |
# | |
# author: Micah Hausler, micah.hausler@akimbo.io | |
postgres-pkgs: | |
pkg: |
OlderNewer