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 python | |
import sys | |
IPS = { | |
'alice' : "10.0.5.101", | |
'bob' : "10.0.5.102", | |
'carol' : "10.0.5.103", | |
'dave' : "10.0.5.104", | |
'eliza' : "10.0.5.105", |
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 python | |
from collections import MutableMapping | |
class Itertest(MutableMapping): | |
def __init__(self): | |
self.underlying = {} | |
def __getitem__(self, key): |
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
[ | |
{ | |
"name": "Periopolis", | |
"srname": "Periopolis", | |
"connections": ["Sapphire District"], | |
"capital": 1 | |
}, | |
{ | |
"name": "Sapphire District", |
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 | |
. /opt/reddit/etc/reddit-env.sh | |
# poor man's interpolation! | |
INI_FILE=$(mktemp) | |
trap "rm $INI_FILE" EXIT | |
cat > $INI_FILE <<EOF | |
[DEFAULT] | |
http_port = $STAGING_HTTP_PORT |
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/sh | |
sudo /sbin/stop valkyribot | |
GIT_WORK_TREE=/var/valkyribot git checkout -f | |
# Perform any necessary migrations | |
git rev-parse --verify HEAD > /var/faceless-games/valkyribot/VERSION | |
cd /var/valkyribot | |
/usr/local/bin/alembic --config=/etc/chromabot/alembic.ini upgrade head | |
# Bump the server | |
sudo /sbin/start valkyribot |
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 python | |
import sys | |
def main(): | |
total = 0 | |
entries = 0 | |
outlier_total = 0 | |
outlier_entries = 0 | |
with open(sys.argv[1], "r") as infile: |
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
robot.error (err, msg) -> | |
robot.logger.error err.stack | |
process.exit(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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
#### PEP8: Module names are usually lowercase; something like `chromabot_listener.py` | |
""" | |
The listening server for the Chromeconomist's connection with Chromabot. | |
Very, very sketchy and impromptu, my first try at something even remotely similar to a | |
REST-like API. Hopefully the pseudo-API I provide Reostra with, in addition to this listening | |
server, will allow Chromabot and Chromeconomist to mesh, adding new depth to the game. |
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 python | |
# -*- coding: utf-8 -*- | |
#### PEP8: Module names should be lowercase, e.g. `chromeconomist.py` | |
#------------------------------------------------------------------------------- | |
# Name: module1 | |
# Purpose: | |
# | |
# Author: James Boggs |
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
# -*- coding: utf-8 -*- | |
#### PEP8: econ_buffs.py | |
""" | |
Created on Sun Dec 14 14:49:05 2014 | |
@author: boggs | |
Module to retrieve defensive buffs from Chromeconomist's DB |
OlderNewer