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
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`), |
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
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; |
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
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. |
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
-- 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; |
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
### | |
## 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?). | |
## |
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
############################################################################### | |
# 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. |
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
# | |
# pushoverbooted service | |
# | |
# Sends a PushOver notification when the box has finished booting. To | |
# install, place this file in /etc/init/ You can test the service by | |
# running 'start pushoverbooted' | |
# | |
# You will need to replace TOKEN with the value you get upon following the | |
# registration process for a pushover application detailed at: | |
# https://pushover.net/api#registration |
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
# | |
# pushoverbooted service | |
# | |
# Sends a PushOver notification when the box has finished booting. To | |
# install, place this file in /etc/init/ You can test the service by | |
# running 'start pushoverbooted' | |
# | |
# You will need to replace TOKEN with the value you get upon following the | |
# registration process for a pushover application detailed at: | |
# https://pushover.net/api#registration |
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
use strict; | |
use vars qw($VERSION %IRSSI); | |
use LWP::UserAgent; | |
use Irssi; | |
$VERSION = '0.0.1'; | |
%IRSSI = ( | |
authors => 'Daniel McCarney', | |
contact => '[email protected]', |
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
#!/bin/bash | |
# | |
# SVN Post-commit hook for the Pushover API | |
# Filters commits to only push when specific authors commit. | |
# Sends commit messages to one or more device KEYS. | |
# List of keys to push to | |
KEYS=( DEVICE_KEY_ONE DEVICE_KEY_TWO DEVICE_KEY_THREE ) | |
# Which commit authors should generate push messages? |
OlderNewer