16.3.12

convert an ogg file to 'asterisk readable' wav.
 - convert ogg to mp3 using some audio tool. i used audacity. converting it directly to wave and trying to use it with asterisk didn't work. but then asterisk itself came to the rescue. from cli do:
asterisk -rx "file convert file.mp3 file.wav"

this is useful when you want to setup custom unavail / busy message and you don't feel like recording custom message using voicemail main manu but do have a file that you'd like to use.

4.3.12

it sounds cliche when you say 'turn your $40 router into $1000 router' (numbers can vary) but it's so true...and not very complicated thing to do.
what costs ~$40? TP-Link TL-MR3420. Plus you I needed a USB hub found laying around and USB 3G dongle that you usually get from you provider for free.
First of all,  I couldn't use TP-Link's firmware even if I wanted to since I doesn't contain an option to enter pin code when setting up 3G connection...sucks.
OpenWRT came to the rescue and after some time I got what I wanted: wireless (for mobiles and netbook) wired LAN (for PC) and wireless + 3G WAN's playing along as failover/load balancer..

TODO: write/upload notes and conf's


send and receive SMS (text) from router's CLI using picocom (AT commands):

root@mywrt:/mnt/stick# picocom /dev/ttyUSB0 <--connect to your modem using picocom
picocom v1.6

port is        : /dev/ttyUSB0
flowcontrol    : none
baudrate is    : 9600
parity is      : none
databits are   : 8
escape is      : C-a
local echo is  : no
noinit is      : no
noreset is     : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv
imap is        :
omap is        :
emap is        : crcrlf,delbs,

Terminal ready
AT+CMGF=1 <--put modem in SMS (text) mode
OK
AT+CMGS="880" <-- tell it to which number you're sending SMS
> MB? <--at > prompt enter the SMS text. in this case i'd like to check how much data i've transferred so for this month (MB?)

+CMGS: 12

OK
AT+CMGF=1
OK
AT+CPMS="SM" <--tell modem that you want to read SMS messages stored on its SIM card
+CPMS: 3,25,3,25,3,25

OK
AT+CMGR=0 <-- read first new message
+CMGR: "REC UNREAD","8410110810150",,"12/03/18,13:44:08+04"
48656C6C6F20576F726C6421

convert hex data to ascii:
root@mywrt:/mnt/stick# echo 48656C6C6F20576F726C6421 | sed 's/../\\x&/g;s/:$//' > /tmp/out && echo -e `cat /tmp/out`
Hello World!

6.1.12

another script which i use to (dis)connect to my company's cisco (web) vpn using openconnect. download: https://github.com/scavara/cnvpn

30.12.11

small perl script that should disable ipv6 on debian 5/6. download:   https://github.com/scavara/debian-disable-ipv6/blob/master/disable.ipv6.pl