by admin | Apr 6, 2011 | Bash
echo “Please wait while I sort your files by date.” for a in *.jpeg; do date -r $a +%y%m%d >/dev/null && { dof=$(date -r $a +%y%m%d) if [ ! -d $dof ]; then mkdir $dof fi mv $a $dof/ }...
by admin | Mar 21, 2011 | Huawei
To set the operating mode of Huawei 3G sticks, use these AT commands (at your own risk). Apparently the setting is saved and used in the future as well. Any : AT^SYSCFG=2,0,3FFFFFFF,2,4 2G only : AT^SYSCFG=13,1,3FFFFFFF,2,4 3G only : AT^SYSCFG=14,2,3FFFFFFF,2,4 2G...
by admin | Mar 18, 2011 | Debian, Development, Perl
#!/usr/bin/perl -w # Modules Needed: # apt-get install libssl-dev # perl -MCPAN -e shell # install Net::SSLeay # install IO::Socket::SSL # install Authen::SASL # install Net::SMTP::SSL use Net::SMTP::SSL; sub send_mail { my $to = $_[0]; my $subject = $_[1]; my $body =...
by admin | Jan 27, 2011 | Asterisk, Linux, VoIP
#!/bin/bash curhip=(`cat /etc/hosts | grep sip.broadvoice.com | awk ‘{ print $1 }’`) echo “Current IP: $curhip” chkip=”(`ping -c 2 sip.broadvoice.com`)” curiplow=(`echo $chkip | grep PING | grep -Eo...
by admin | Dec 20, 2010 | Debian, Linux, Networking
# apt-get install ethtool net-tools # ethtool eth0 or # mii-tool eth0 add a pre-up line to /etc/network/interfaces. Something like this: iface eth0 inet static pre-up /usr/sbin/ethtool -s eth0 speed 1000 duplex full autoneg off address … OR Debian init script: #...