Skip to content

Instantly share code, notes, and snippets.

@gocarlos
gocarlos / dynv6.sh
Created August 25, 2016 08:46 — forked from corny/dynv6.sh
Update script for dynv6.com to set your IPv4 address and IPv6 prefix
#!/bin/sh -e
hostname=$1
device=$2
file=$HOME/.dynv6.addr6
[ -e $file ] && old=`cat $file`
if [ -z "$hostname" -o -z "$token" ]; then
echo "Usage: token=<your-authentication-token> [netmask=64] $0 your-name.dynv6.net [device]"
exit 1
fi
@gocarlos
gocarlos / turnOnTV.sh
Created April 24, 2016 16:19
Snippet to turn of the TV Sharp LC-60LE635E and similar with another computer remotelly
1. install telnet on your computer
2. install expect on your comptuer
3. create the a file withthe code of turnOnTV.sh
4. change permissions on that file (chmod 500 turnOnTV.sh)
5. create eventually a cron job to run this script.(50 5 * * * expect ~/scripts/turnOnTV.sh)
You need to set permission to file be read by the owner (400) and allow it execution by the owner (100).