Github markdown tables not working

I noticed that markdown tables was not rendering correctly on Github. In their markdown guide they say:

Note that the dashes at the top don't need to match the length of the header text exactly:

But what they don't say is that it needs to be at least three dashes.

Sending push notifications to my phone

I had an XMPP server which I used to send Nagios notifications to my phone using XMPP messages. I also hoped to use it for chatting with people, but since everyone uses locked in systems like Facebook and Skype that don't support federation I decided to stop using XMPP.

I decided to use the service Pushover.net instead which is has a mobile app for receiving push notifications.

It works great, you register you app on the website and your device from your mobile. After that it's just a simple HTTP POST request away from sending push messages.

I created a small python script which I use in my Nagios system that sends the alert through Pushover. It's in my github script repo.

Send-Pushover (Check the repo for the latest version)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env python3

import argparse
import requests
import sys

def push_message(message, app, user):
        data = { "token": app, "user": user, "message": message }
        r = requests.post("https://api.pushover.net/1/messages.json", params=data)

def main(argv):
    parser = argparse.ArgumentParser(description="Push message with Pushover.net")
    parser.add_argument('-a', dest='app_id', required=True, help="Application ID")
    parser.add_argument('-u', dest='user_id', required=True, help="User ID")
    parser.add_argument('-m', dest='message', required=False, default='', help="Message to send, can also be read from stdin")
    args = parser.parse_args(argv)

    if (args.message == '') and not sys.stdin.isatty():
        for line in sys.stdin:
            args.message = args.message + line

    push_message(args.message, args.app_id, args.user_id)

if __name__ == "__main__":
    main(sys.argv[1:])

A tool for distributing password over unsecure channels like email

A recurring problem at work it how to easily send passwords to users. Or sending shared keys for VPN tunnel setups with customers.

I remembered that I had seen a tool for this online that used a webpage where you could enter the password and get a link for retrieve the password that will also remove the password to prevent others from accessing it.

And since I recently started learning Flask which is a nice Python framework for creating websites, I decided to create my own tool for this.

So here it is

http://that-password.steneteg.org/

That Password

Here is the source code for it:

https://github.com/rogst/that-password

Remove shadow from input text in mobile Firefox browser

I noticed a strange shadow on a input text field that was only visible on the mobile version of Firefox browser.

Input text shadow

It turns out that this shadow is a background image that is automatically applied to the input text element on the mobile version of Firefox. So the solution to remove this is to unset the background image using CSS.

1
background-image: none;