Skip to content

Instantly share code, notes, and snippets.

@tochev
tochev / zbase32.py
Created August 9, 2014 10:56
Command line zbase32 encoder and decoder
#!/usr/bin/env python3
"""
Command line zbase32 encoder and decoder.
See http://philzimmermann.com/docs/human-oriented-base-32-encoding.txt
Please note that scrip loads the data in memory.
Copyright: Tocho Tochev <tocho AT tochev DOT net>
Licence: MIT
"""
@tochev
tochev / ustream2vlc.sh
Created June 1, 2014 16:35
watch ustream.tv using vlc
#!/bin/bash
#
# ustream2vlc.sh http://ustream.tv/CHANNEL
# watch ustream.tv using vlc
#
# NOTE: iphone quality only
set -x
set -e
CHANNEL_ID=$(wget "$1" -q -O - | sed -n 's/.*<meta name="ustream:channel_id" content="\([0-9]*\)".*/\1/p')
vlc "http://iphone-streaming.ustream.tv/uhls/$CHANNEL_ID/streams/live/iphone/playlist.m3u8" vlc://quit
@tochev
tochev / bwtest.sh
Created May 31, 2014 21:07
tests bandwidth and ping to speedtest.net servers
#!/bin/bash
set -e
# tests bandwidth and ping to speedtest.net servers
# uses https://github.com/sivel/speedtest-cli/
TEST_SERVERS=(
"2320) ComNet Bulgaria (Sofia, Bulgaria)"
"1917) VIVACOM (Sofia, Bulgaria)"
@tochev
tochev / send_sms.py
Created May 31, 2014 20:53
A script to send SMS from the internet for the Bulgaria operators mtel and globul
#!/usr/bin/env python
# set encoding=utf-8
# A script to send SMS from the internet for the Bulgaria operators mtel and globul
import argparse
import json
import mechanize
import os.path