Skip to content

Instantly share code, notes, and snippets.

View psychemedia's full-sized avatar

Tony Hirst psychemedia

View GitHub Profile
@psychemedia
psychemedia / IPspeak.pl
Created June 6, 2020 18:11 — forked from andysc/IPspeak.pl
Speak the IP address of your linux machine. Perfect for Raspberry PIs or other headless servers with audio output. Just plug in a speaker or earphones and wait to be told the IP address to ssh to!
#!/usr/bin/perl
# IPspeak
# Andy S-C
# 18-May-13
# 15-Oct-16 - made more "human" ... ten dot nought dot one nine three dot seventeen
# this is the order we check the interfaces
@interfaces = ("eth0", "wlan0");
#!/bin/sh
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite