I hereby claim:
- I am binaryparadox on github.
- I am cpu (https://keybase.io/cpu) on keybase.
- I have a public key whose fingerprint is EA93 53F3 1EAA C378 B854 99AE 9599 2CFB 3537 3091
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/python | |
# Fuck Boingo. Fuck $7 wifi | |
# requests module is a non-optional dependency | |
# gntp is an optional dependency for Growl support | |
from os import sys | |
from random import randint | |
from shlex import split | |
from subprocess import check_call |
#!/bin/bash | |
################################################################################ | |
# About | |
################################################################################ | |
# | |
# Dumb script to generate a random 100x100 tile in the p4m background group. | |
# Uses 'feh' to tile the image as a desktop background. | |
# | |
# Install to crontab -e to rengerate at a fixed interval. E.g. every 5 min: |
I hereby claim:
To claim this, I am signing this object:
DROP TABLE IF EXISTS ipd_users; | |
DROP TABLE IF EXISTS ipd_associations; | |
DROP TABLE IF EXISTS ipd_logins; | |
DROP TABLE IF EXISTS ipd_logouts; | |
-- The table of usernames and their unique ID | |
CREATE TABLE ipd_users ( | |
`id` INT NOT NULL auto_increment, | |
`username` VARCHAR(13), | |
PRIMARY KEY(`id`), |
DROP VIEW IF EXISTS ipd_ips; | |
DROP VIEW IF EXISTS ipd_dested_players; | |
DROP VIEW IF EXISTS ipd_timeout_events; | |
DROP VIEW IF EXISTS ipd_player_replace_events; | |
DROP VIEW IF EXISTS ipd_quit_events; | |
DROP VIEW IF EXISTS ipd_in_out; | |
DROP VIEW IF EXISTS ipd_user_logouts; | |
DROP VIEW IF EXISTS ipd_user_logins; | |
DROP VIEW IF EXISTS ipd_pretty_associations; | |
DROP VIEW IF EXISTS ipd_ip_popularity; |
DROP PROCEDURE IF EXISTS log_disconnect; | |
DROP PROCEDURE IF EXISTS log_connection; | |
DELIMITER // | |
-- The log_connection() procedure is called when a user connects to the game. | |
-- It accepts the username that is connecting, and the ip they are connecting | |
-- from. It then adds the user if their username is new, associates the | |
-- username with the IP making sure to update the count of how many times | |
-- they've connected from that IP. Finally it adds a login for this user at | |
-- the present time/date. |
-- Selecting IPs used by a username | |
SELECT username, ip FROM ipd_pretty_associations WHERE username = '%s' ORDER BY count DESC; | |
-- Selecting usernames that have used a specific IP | |
SELECT ip, username, count, countryCode FROM ipd_pretty_associations WHERE ip = '%s' | |
ORDER BY count DESC; | |
-- Selecting usernames that have used a wildcarded IP | |
SELECT ip, username, count, countryCode FROM ipd_pretty_associations WHERE ip LIKE '%s' | |
ORDER BY count DESC; |
### | |
## Stay On Target! | |
## Daniel McCarney 2011 | |
## https://binaryparadox.net | |
## | |
## Using an interactive countdown function found on the unix.com forums | |
## I created a shell function/alias that allows me to avoid procrastinating | |
## (if I procrastinate by writing code to stop procrastinating it equals out | |
## right?). | |
## |
############################################################################### | |
# Quick & Dirty script to download the Avatars of your Twitter Followers | |
# Daniel McCarney -- 10/10/11 | |
# | |
# Emphasis on the quick & dirty. There's no error handling, and bad things | |
# are liable to happen if you have Twitter followers with malicious avatars | |
# | |
# Requirements: Python 2.6, python-twitter, OAuth keys* | |
# | |
# *Twitter requires OAuth authentication for the API calls this script uses. |