Skip to content

Instantly share code, notes, and snippets.

/*
The MIT License (MIT)
Copyright (c) 2014 Ismael Celis
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@tdack
tdack / lcdui.py
Last active August 29, 2015 14:06 — forked from ufux/lcdui.py
import smbus
import getopt
import sys
from time import *
from time import gmtime, strftime
# TODO: Factor out all device_write calls to some PCF8574 specific module ...
# will be different with another io expander
# communication from expander to display: high nibble first, then low nibble
@tdack
tdack / upgrade_ghost.sh
Last active January 6, 2016 23:45 — forked from anonymous/upgrade_ghost.sh
Bash script to upgrade your Ghost blog installation to the latest version
#!/bin/bash
# Make sure only root can run our script
if [[ ${EUID} -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
if [[ $# -eq 0 ]]; then
echo "Usage:"
echo " $0 <systemd|sysv>"