Project: hockey-info

So I don’t always have great cell phone service, sometimes its weak 4G or even not 4G at all so modern designed apps suffer when bandwidth is a trickle at best. I would be away from home trying to find out whats going on with a Caps game and the NHL app would just be painfully slow or not work at all sometimes. Eventually I decided the only reasonable thing a hockey nerd such as myself could do was write something to fill this void, ideally something simple and effective to get me the information I wanted without a lot of overhead and frilly extra stuff I didn’t really care about.

The repos are still in high flux right now as I don’t even have a readme file yet for the main one, however this page can serve to sort of explain the bits and pieces.

nhlapi – This is what started it all for me really, I wanted more information about games (for an IRC bot) and threw myself into pulling various bits of information together about the NHL API in an easy to read and access way so others didn’t have to spend the hours I did looking for how to do things.

hockey-info – A super simple website written in Python utilizing the Flask framework. The focus is to be fast, simple and mobile friendly. It directly queries the NHL API for all its information and is formatted in a way that works well on mobile

hockey-info-docker – A bare bones Dockerfile to deploy the latest release of hockey-info. The container is based on Alpine and is as trimmed down as possible, makes deployment super simple and easy for anybody to run their own instance with only a few commands (provided you already have a Docker host to run it on).

Naturally I make no warranty about this app or any of the code I have written, its purely something neat I built in my spare time and am tossing out there for others to enjoy, modify and extend to their hearts content. If you do happen to have input, ideas, or feedback hit me up on twitter or just open an issue on Gitlab if its a purely technical issue to address with the code.

bhistory, a tool for nobody

Previously I enabled Timestamps in Bash to allow me to know when someone was doing stupid things, such as deleting vixie-cron or truncating databases at midnight, now I have system that backups all of the .bash_history files on my production system and stores them so I can look for stupid behavior, however the logfiles are a little unfriendly to the human eye

example of logfiles go here

This necessitated the creation of a script that would let me view the history file as it was originally viewable with the history command and the timestamps parsed, thus bhistory was created.

Simple chmod the file, call it bhistory or whatever else you please and then drop it somewhere that your path statement covers and its time to view that logfile (and hopefully not find stupid things happening)

Usage: # bhistory /home/somebody/.bash_history

Naturally nobody should consider this a script that I support in any way, use this mess of code at your own discretion just make sure you have the timestamps enabled or not much is going to happen when you use it.

SSH Connection Script

Ever have a shitty environment where you have tons of devices that you need to connect to and don’t feel like typing out (and invariably mis-typing the hostname)?  Then this dirt simple script might be what you are looking for.

Just make sure the host file exists and has a hostname on each line rather than smashed together with some delimiter.  Its not elegant, has zero configuration but so far folks at work have found it somewhat handy to save some time, maybe you will too.

 

Powerball number picker

So I spent a little time the other day applying what little I know of Python to the concept of picking Powerball lottery numbers because I had nothing much else to do that the time.  In the interest of not only content put putting more of my terrible code out there for people to laugh at I present my simple powerball picker script.

* note – if you win a huge jackpot with numbers from this send a few bills my way!

Bitnami