Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
# Plex update script
# requires jq, curl, wget and sha1sum
# written for debian systemd environments
# CONFIGURATION
url="https://plex.tv/api/downloads/5.json?channel=plexpass"
package="plexmediaserver"
service="$package.service"
build="linux-x86_64"
@lesander
lesander / hash.php
Created May 18, 2014 10:09
Hash password securely with sha512, salt and a secret key
<?php
// Hash file using sha512, salt and a secret key.
// By github.com/lesander
// DON'T FORGET TO EDIT YOUR $secretkey !!!
// - Hashing your Password -
// Example 1 Request:
// http://domain.com/hash.php?s=myPassword
// Example 1 Result:
@lesander
lesander / ticktacktoe.py
Last active June 24, 2020 14:35
Tic Tac Toe in Python
#!/usr/bin/env/python3
#
# Tic Tac Toe in Python 3
# Licensed under the MIT License
#
# This was created as part
# of a one-hour code challenge.
import subprocess
  • test
@lesander
lesander / mac-switch.sh
Created January 6, 2015 15:59
MAC Address Switcher v1.1.0
#!/bin/bash
# MAC Address Switcher v1.1.0
# Written by lesander - http://github.com/lesander
# Licensed under GPLv3
# Tested on Ubuntu 14.04
# - Set MAC addresses and settings.
address1=""
address2=""