Jupiter’s coming.

Leave a comment

ch-t chat


Been ungodly sick lately with all the bad weather. One of the reasons not much new has come out. hopefully that will change soon.

Do not know if I mentioned but I pur Arch linux on the Pogoplug V2. Arch linux is different though most distros are supposed to go to systemd. I also installed arch in a desktop remotely via ssh. The installs are documented on www.instructable.com/member/computothought.

We are getting close to 1,000,000 views on ww.instructable.com/member/computothought. we are going to have a big party when it does.

Can’t believe I still have a few old pentium one based boards. Everything form a router, robot  to a somple desktop

Probably turn my old 486 laptop dumb terminal. Putty will load from a floppy.



Sometimes every once in a while, you find an old generally unused command, but now you find it is very valuable. One such command is know as ttyrec. As the name suggests, you can probably record what is typed at the terminal.   This is excellent for documentation purposes. It is a must for people who do any amount of work on the command line.  An example: recently did a remote install of Arch linux on a remote machine.  It would have been nice to have a record of all the work done.

Well how do you use it? There are actually two parts of the system. ttyrec does the recording and ttyplay  will playback what you have recorded.  So you will want to invoke ttyrec with a filename (for later playback,) which will generate a new shell or prompt.  Go ahead and trpe in the coomands you want to do, then when you are finnished, use <control>d to exit the the recording. You will see the word exit to confirm the exit of the ttyrec program.

$ ttyrec filename
$ echo hello world
hello world
$<control>d   exit

Now to playback what your have typed in exactly as you have typed it then use:

$ ttyshow filename

The playback will show everything as it was done like a movie.Now anytime you want to check out what you did during the recording session, it is at your fingertips. Also too makes for great educational media.


List commonly used commans:

$ history | awk {‘print $2′} | sort | uniq -c | sort -k1 -rn | head
127 sudo
96 vim
86 cd
62 youtube-dl
61 ls
29 ssh
29 rm
29 gcc
28 vlc
23 locate

List files in last modified order

$ ls -al
total 684
drwxr-xr-x    2 eddie eddie   4096 Mar 22 16:54 .
drwxr-xr-x 1002 eddie eddie 299008 Mar 24 03:06 ..
-rw-r–r–    1 eddie eddie  33245 Mar 22 16:54 biscuit.jpg
-rw-r–r–    1 eddie eddie  50528 Mar 22 16:47 mm1.jpg
-rw-r–r–    1 eddie eddie  77970 Mar 22 16:47 mm2.jpg
-rw-r–r–    1 eddie eddie  77621 Mar 22 16:48 mm4.jpg
-rw-r–r–    1 eddie eddie  38828 Mar 22 16:48 mm5.jpg
-rw-r–r–    1 eddie eddie  30756 Mar 22 16:49 mm6.jpg
-rw-r–r–    1 eddie eddie  22836 Mar 22 16:50 mm7.jpg
-rw-r–r–    1 eddie eddie  11167 Mar 22 16:50 mm8.jpg
-rw-r–r–    1 eddie eddie  30467 Mar 22 16:51 mm9.jpg

$ ls -t
biscuit.jpg  mm8.jpg  mm6.jpg  mm4.jpg  mm1.jpg
mm9.jpg      mm7.jpg  mm5.jpg  mm2.jpg
$ ls -tr
mm1.jpg  mm4.jpg  mm6.jpg  mm8.jpg  biscuit.jpg
mm2.jpg  mm5.jpg  mm7.jpg  mm9.jp


$ ssh -G 2>&1 | grep -e illegal -e unknown > /dev/null && echo “System clean” || echo “System infected”
System clean


$ apt-get moo
/ |    ||
*  /\—/\
~~   ~~

“Have you mooed today?”…

$ aptitude -vv moo
Didn’t I already tell you that there are no Easter Eggs in this program?

$ aptitude -vvv moo
Stop it!
Didn’t I already tell you that there are no Easter Eggs in this program?
$ aptitude -vvvv moo
Okay, okay, if I give you an Easter Egg, will you go away?
$ aptitude -vvvvv moo
All right, you win.

——-/      \
/               \
/                |
—————–/                  ——–\
eddie@oedt01:~$ aptitude -vvvvvv moo
What is it?  It’s an elephant being eaten by a snake, of course.


Almost to a million views on the instructables site.

Screenshot from 2014-03-11 17:40:46


The ability to get data from one computer to another is essential for one or more computers on a network. What happens that one computer essential becomes a host/server and the other computer the client, A good example of this might be a networked game, but it all starts with a simple peiece of cde that can get more complicated as the need arises. The server code for this simple example.


#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <time.h>

int main(int argc, char *argv[])
int listenfd = 0, connfd = 0;
struct sockaddr_in serv_addr;

char sendBuff[1025];
time_t ticks;

listenfd = socket(AF_INET, SOCK_STREAM, 0);
memset(&serv_addr, ’0′, sizeof(serv_addr));
memset(sendBuff, ’0′, sizeof(sendBuff));

serv_addr.sin_family = AF_INET;
serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);
serv_addr.sin_port = htons(5000);

bind(listenfd, (struct sockaddr*)&serv_addr, sizeof(serv_addr));

listen(listenfd, 10);

connfd = accept(listenfd, (struct sockaddr*)NULL, NULL);

ticks = time(NULL);
snprintf(sendBuff, sizeof(sendBuff), “%.24s\r\n”, ctime(&ticks));
write(connfd, sendBuff, strlen(sendBuff));


The you need code for the client


#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <netdb.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <arpa/inet.h>

int main(int argc, char *argv[])
int sockfd = 0, n = 0;
char recvBuff[1024];
struct sockaddr_in serv_addr;

if(argc != 2)
printf(“\n Usage: %s <ip of server> \n”,argv[0]);
return 1;

memset(recvBuff, ’0′,sizeof(recvBuff));
if((sockfd = socket(AF_INET, SOCK_STREAM, 0)) < 0)
printf(“\n Error : Could not create socket \n”);
return 1;

memset(&serv_addr, ’0′, sizeof(serv_addr));

serv_addr.sin_family = AF_INET;
serv_addr.sin_port = htons(5000);

if(inet_pton(AF_INET, argv[1], &serv_addr.sin_addr)<=0)
printf(“\n inet_pton error occured\n”);
return 1;

if( connect(sockfd, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) < 0)
printf(“\n Error : Connect Failed \n”);
return 1;

while ( (n = read(sockfd, recvBuff, sizeof(recvBuff)-1)) > 0)
recvBuff[n] = 0;
if(fputs(recvBuff, stdout) == EOF)
printf(“\n Error : Fputs error\n”);

if(n < 0)
printf(“\n Read error \n”);

return 0;

Of course to make thecode usable you would

$ gcc server.c -o server

$ gcc client.c client

The goal in this case is for the client to grab the time from the server or host. Optimally you want to do this between two diffferent machines, but for basic testing purposes you ran run the programs on the same machine,

$ ,/server &

[1] 6823

Useage: ./client hostipaddress

$ ./client

Tue Mar 11 13:40:15 2014

Another example that ais a bit more interactive. The server will play pback what is typed at the client.


C socket server example

#include<string.h>    //strlen
#include<arpa/inet.h> //inet_addr
#include<unistd.h>    //write

int main(int argc , char *argv[])
int socket_desc , client_sock , c , read_size;
struct sockaddr_in server , client;
char client_message[2000];

//Create socket
socket_desc = socket(AF_INET , SOCK_STREAM , 0);
if (socket_desc == -1)
printf(“Could not create socket”);
puts(“Socket created”);

//Prepare the sockaddr_in structure
server.sin_family = AF_INET;
server.sin_addr.s_addr = INADDR_ANY;
server.sin_port = htons( 8888 );

if( bind(socket_desc,(struct sockaddr *)&server , sizeof(server)) < 0)
//print the error message
perror(“bind failed. Error”);
return 1;
puts(“bind done”);

listen(socket_desc , 3);

//Accept and incoming connection
puts(“Waiting for incoming connections…”);
c = sizeof(struct sockaddr_in);

//accept connection from an incoming client
client_sock = accept(socket_desc, (struct sockaddr *)&client, (socklen_t*)&c);
if (client_sock < 0)
perror(“accept failed”);
return 1;
puts(“Connection accepted”);

//Receive a message from client
while( (read_size = recv(client_sock , client_message , 2000 , 0)) > 0 )
//Send the message back to client
write(client_sock , client_message , strlen(client_message));

if(read_size == 0)
puts(“Client disconnected”);
else if(read_size == -1)
perror(“recv failed”);

return 0;


C ECHO client example using sockets
#include<stdio.h> //printf
#include<string.h>    //strlen
#include<sys/socket.h>    //socket
#include<arpa/inet.h> //inet_addr

int main(int argc , char *argv[])
int sock;
struct sockaddr_in server;
char message[1000] , server_reply[2000];

//Create socket
sock = socket(AF_INET , SOCK_STREAM , 0);
if (sock == -1)
printf(“Could not create socket”);
puts(“Socket created”);

server.sin_addr.s_addr = inet_addr(“″);
server.sin_family = AF_INET;
server.sin_port = htons( 8888 );

//Connect to remote server
if (connect(sock , (struct sockaddr *)&server , sizeof(server)) < 0)
perror(“connect failed. Error”);
return 1;


//keep communicating with server
printf(“Enter message : “);
scanf(“%s” , message);

//Send some data
if( send(sock , message , strlen(message) , 0) < 0)
puts(“Send failed”);
return 1;

//Receive a reply from the server
if( recv(sock , server_reply , 2000 , 0) < 0)
puts(“recv failed”);

puts(“Server reply :”);

return 0;

of couse, you need to compile these also.

$ gcc server1.c -o server1

$gcc client2.c -o client1

$. ./server1 &

$ ./client

Socket created
Connection accepted

Enter message : test
Server reply :
Enter message :
asdasdf asd asd
Server reply :
Enter message : Server reply :
Enter message : Server reply :
Enter message : a s asd asd f
Server reply :
Enter message : Server reply :
Enter message : Server reply :
Enter message : Server reply :
Enter message : Server reply :
Enter message : ^CClient disconnected

[3]+  Done                    ./server1
<Control>c was keyed in.


Some linuc commands to play with. Your distro may vary.


$ uname –a => Display linux system information
$ uname –r => Display kernel release information (refer uname command in detail)
$ cat /etc/redhat_release => Show which version of redhat installed
$ uptime => Show how long system running + load (learn uptime command)
$ hostname => Show system host name
$ hostname -i => Display the IP address of the host (all options hostname)
$ last reboot => Show system reboot history (more examples last command)
$ date => Show the current date and time (options of date command)
$ cal => Show this month calendar (what more in cal)
$ w => Display who is online (learn more about w command)
$ whoami => Who you are logged in as (example + sreenshots)
$ finger user => Display information about user (many options of finger command)

2. Hardware

$ dmesg => Detected hardware and boot messages (dmesg many more options)
$ cat /proc/cpuinfo => CPU model
$ cat /proc/meminfo => Hardware memory
$ cat /proc/interrupts => Lists the number of interrupts per CPU per I/O device
$ lshw => Displays information on hardware configuration of the system
$ lsblk => Displays block device related information in Linux (sudo yum install util-linux-ng)
$ free -m => Used and free memory (-m for MB) (free command in detail)
$ lspci -tv => Show PCI devices (very useful to find vendor ids)
$ lsusb -tv => Show USB devices (read more lsusb options)
$ lshal => Show a list of all devices with their properties
$ dmidecode => Show hardware info from the BIOS (vendor details)
$ hdparm -i /dev/sda # Show info about disk sda
$ hdparm -tT /dev/sda # Do a read speed test on disk sda
$ badblocks -s /dev/sda # Test for unreadable blocks on disk sda

3. Statistics

$ top => Display and update the top cpu processes (30 example options)
$ mpstat 1 => Display processors related statistics (learn mpstat command)
$ vmstat 2 => Display virtual memory statistics (very useful performance tool)
$ iostat 2 => Display I/O statistics (2sec Intervals) (more examples)
$ tail -n 500 /var/log/messages => Last 10 kernel/syslog messages (everyday use tail options)
$ tcpdump -i eth1 => Capture all packets flows on interface eth1 (useful to sort network issue)
$ tcpdump -i eth0 ‘port 80′ => Monitor all traffic on port 80 ( HTTP )
$ lsof => List all open files belonging to all active processes.(sysadmin favorite command)
$ lsof -u testuser => List files opened by specific user
$ free –m => Show amount of RAM (daily usage command)
$ watch df –h => Watch changeable data continuously(interesting linux command)

4. Users

$ id => Show the active user id with login and group(with screenshot)
$ last => Show last logins on the system (few more examples)
$ who => Show who is logged on the system(real user who logged in)
$ groupadd admin => Add group “admin” (force add existing group)
$ useradd -c “Sam Tomshi” -g admin -m sam => Create user “sam” and add to group “admin”(here read all parameter)
$ userdel sam => Delete user sam (force,file removal)
$ adduser sam => Add user “sam”
$ usermod => Modify user information(mostly useful for linux system admins)

5. File Commands

$ ls –al => Display all information about files/ directories(20 examples)
$ pwd => Show current directory path(simple but need every day)
$ mkdir directory-name => Create a directory(create mutiple directory)
$ rm file-name => Delete file(be careful of using rm command)
$ rm -r directory-name => Delete directory recursively
$ rm -f file-name => Forcefully remove file
$ rm -rf directory-name => Forcefully remove directory recursively
$ cp file1 file2 => Copy file1 to file2 (15 cd command examples)
$ cp -r dir1 dir2 => Copy dir1 to dir2, create dir2 if it doesn’t exist
$ mv file1 file2 => Move files from one place to another(with 10 examples)
$ ln –s /path/to/file-name link-name => Create symbolic link to file-name (examples)
$ touch file => Create or update file (timestamp change)
$ cat > file => Place standard input into file (15 cat command examples)
$ more file => Output the contents of file (help display long tail files)
$ head file => Output the first 10 lines of file (with different parameters)
$ tail file => Output the last 10 lines of file (detailed article with tail options)
$ tail -f file => Output the contents of file as it grows starting with the last 10 lines
$ gpg -c file => Encrypt file (how to use gpg)
$ gpg file.gpg => Decrypt file

6. Process Related

$ ps # Display your currently active processes (many parameters to learn)
$ ps aux | grep ‘telnet’ # Find all process id related to telnet process
$ pmap # Memory map of process (kernel,user memory etc)
$ top # Display all running processes (30 examples)
$ kill pid # Kill process with mentioned pid id (types of signals)
$ killall proc # Kill all processes named proc
$ pkill processname # Send signal to a process with its name
$ bg # Resumes suspended jobs without bringing them to foreground (bg and fg command)
$ fg # Brings the most recent job to foreground
$ fg n # Brings job n to the foreground

7. File Permission Related

$ chmod octal file-name # Change the permissions of file to octal , which can be found separately for user, group and world
octal value (more examples)
4 – read
2 – write
1 – execute
$ chmod 777 /data/test.c # Set rwx permission for owner , rwx permission for group, rwx permission for world
$ chmod 755 /data/test.c # Set rwx permission for owner,rw for group and world
$ chown owner-user file # Change owner of the file (chown more examples)
$ chown owner-user:owner-group file-name # Change owner and group owner of the file
$ chown owner-user:owner-group directory # Change owner and group owner of the directory
$ chown bobbin:linoxide test.txt
$ ls -l test.txt
-rw-r–r– 1 bobbin linoxide 0 Mar 04 08:56 test.txt
8. Network

$ ifconfig –a # Display all network ports and ip address (set mtu and other all options)
$ ifconfig eth0 # Display specific ethernet port ip address and details
$ ip addr show # Display all network interfaces and ip address(available in iproute2 package,powerful than ifconfig)
$ ip address add dev eth0 # Set ip address
$ ethtool eth0 # Linux tool to show ethernet status (set full duplex , pause parameter)
$ mii-tool eth0 # Linux tool to show ethernet status (more or like ethtool)
$ ping host # Send echo request to test connection (learn sing enhanced ping tool)
$ whois domain # Get who is information for domain
$ dig domain # Get DNS information for domain (screenshots with other available parameters)
$ dig -x host # Reverse lookup host
$ host google.com # Lookup DNS ip address for the name (8 examples of host command)
$ hostname –i # Lookup local ip address (set hostname too)
$ wget file # Download file (very useful other option)
$ netstat -tupl # Listing all active listening ports(tcp,udp,pid) (13 examples)

9. Compression / Archives

$ tar cf home.tar home # Create tar named home.tar containing home/ (11 tar examples)
$ tar xf file.tar # Extract the files from file.tar
$ tar czf file.tar.gz files # Create a tar with gzip compression
$ gzip file # Compress file and renames it to file.gz (untar gzip file)

10. Install Package

$ rpm -i pkgname.rpm # Install rpm based package (Installing, Uninstalling, Updating, Querying ,Verifying)
$ rpm -e pkgname # Remove package
Install from source
make install (what it is)

11. Search

$ grep pattern files # Search for pattern in files (you will this command often)
$ grep -r pattern dir # Search recursively for pattern in dir
$ locate file # Find all instances of file
$ find /home/tom -name ‘index*’ # Find files names that start with “index”(10 find examples)
$ find /home -size +10000k # Find files larger than 10000k in /home

12. Login (ssh and telnet)

$ ssh user@host # Connect to host as user (secure data communication command)
$ ssh -p port user@host # Connect to host using specific port
$ telnet host # Connect to the system using telnet port

13. File Transfer

$ scp file.txt server2:/tmp # Secure copy file.txt to remote host /tmp folder
$ scp nixsavy@server2:/www/*.html /www/tmp # Copy *.html files from remote host to current system /www/tmp folder
$ scp -r nixsavy@server2:/www /www/tmp # Copy all files and folders recursively from remote server to the current system /www/tmp folder
$ rsync -a /home/apps /backup/ # Synchronize source to destination
$ rsync -avz /home/apps linoxide@ # Synchronize files/directories between the local and remote system with compression enabled

14. Disk Usage

$ df –h # Show free space on mounted filesystems(commonly used command)
$ df -i # Show free inodes on mounted filesystems
$ fdisk -l # Show disks partitions sizes and types(fdisk command output)
$ du -ah # Display disk usage in human readable form (command variations)
$ du -sh # Display total disk usage on the current directory
$ findmnt # Displays target mount point for all filesystem
$ mount device-path mount-point # Mount a device

15. Directory Traverse

$ cd .. # To go up one level of the directory tree(simple & most needed)
$ cd # Go to $HOME directory
$ cd /test # Change to /test directory

- See more at: http://linoxide.com/guide/linux-command-shelf.html#sthash.wKhpbua3.dpuf


Cast irin griddle toast.


Off and running.

Leave a comment

Chit chat


There was a post that wanted everyone to learn programming and of course I had to chime in:  What people do not tell you is that you really need at least two disciplines., The IT part if course, but you also need to know the industry you are going to code for. How can you develop an accounting program if you do not have a clue about debits and credits.  You also need common sense and how to piece things together. Many people have said that musicians can make for good programmers.One thing that people forget is that they think all your need are  programmers,. There has to be someone among others to do systems analysis of a project before programming is ever done. Hardware, software, people, procedures, and data have to be coordinated.  Wonder if any systems analysis was done on the Obamacare website?

We have replaced youtube-dl yourtubeurl -f 34 with youtube-dl youtubeirl -f flv

Sometimes I will save videos about equipment I do not own in case I ever have a chance to get such equipment. i.e. linux on a tablet.

Decided to  experment a little bit. Pretended to be blind and took a debian network boot cd  and inserted it into a machine with the monitor turned off to see if I could do a sightless install. Debian does have a audio based screen reader.There was not as much help as there should have been. Probably would recommend some improvements..


Installed arch linux on an i686 (aka pentium II). Installed linux many a time, but this is a new experience using arch as an os on a desktop. One thing that was different was to use the secure shell to remotely connect to the install machine. That way I could cut and paste commands as needed and save a lot of typing. There were some issues, that really were not issues. Had to use a search engine to rectify things I did not understand. Allegedly the live cd makes it easy to install. I had to do it the old fashion way. Having linux expperience already made things easier. If I had been a novice, it would not have been installed.  Will probably take the several instruction sheets I used to make my own install procedure.  Kde seemed to work ok and the command line was very zippy.

I am assuming you now how to download and burn the arch linux cd.



Index of /archlinux/iso/2014.01.05

Name Last modified Size Description

Parent Directory -
arch/ 05-Jan-2014 03:26 -
archlinux-2014.01.05-dual.iso 05-Jan-2014 03:41 528M
archlinux-2014.01.05-dual.iso.sig 05-Jan-2014 03:41 287
archlinux-2014.01.05-dual.iso.torrent 05-Jan-2014 03:41 30K
archlinux-bootstrap-2014.01.05-i686.tar.gz 05-Jan-2014 03:42 75M
archlinux-bootstrap-2014.01.05-i686.tar.gz.sig 05-Jan-2014 03:42 287
archlinux-bootstrap-2014.01.05-x86_64.tar.gz 05-Jan-2014 03:44 77M
archlinux-bootstrap-2014.01.05-x86_64.tar.gz.sig 05-Jan-2014 03:44 287
md5sums.txt 05-Jan-2014 03:44 220
sha1sums.txt 05-Jan-2014 03:44 244

Apache Server at mirrors.gigenet.com Port 80
Of course I had already installed arch linux on the pogoplug a while back.
Boot the arch minimal iso in the target machine.and at the oot prompt change the password

# passwd
root@archiso ~ # passwd
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

root@archiso ~ #

See if you have an internet connectio

root@archiso ~ # ping -c 1 http://www.google.com
PING http://www.google.com ( 56(84) bytes of data.
64 bytes from og-in-f106.1e100.net ( icmp_seq=1 ttl=44 time=20.5 ms
http://www.google.com ping statistics —
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 20.597/20.597/20.597/0.000 ms
root@archiso ~ #

See what the name of your nic card is to the system

root@archiso ~ # dmesg | grep eth
[   37.369974] systemd-udevd[178]: renamed network interface eth0 to enp0s12

Get get the ip address

# ip addr show dev enp0s12
2: enp0s12: mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
link/ether 00 00 00 00 00 00 00 brd ff:ff:ff:ff:ff:ff
inet brd scope global enp0s12
valid_lft forever preferred_lft forever
inet6 fe80::210:5aff:fe19:fd88/64 scope link
valid_lft forever preferred_lft forever

Start the ssh session

# systemctl start sshd

Go to a remote machine and log in (since root is the only user, you have to log in as root)

$ ssh root@

The authenticity of host ’ (’ can’t be established.
ECDSA key fingerprint is (a bunch of hex numbers).
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ’′ (ECDSA) to the list of known hosts.
root@′s password:
Last login: Fri Jan 10 03:27:12 2014 from remotecomputer
root@archiso ~ #

Now you can turn off the monitor to the machine to be installed to save a bit of power. From here you can follow any number of arch linux command line install pages:

Skip past the network install since it is already working.


Interesting script to automate command line remote  login (i.e. never type that password again!):

<br /># invoke with ./Installkey.sh servername<br /><br /># set up the .ssh dir if it does not exists<br />DIRECTORY=",ssh"<br />ssh $1 'if [ ! -d "$DIRECTORY" ];  then  mkdir $DIRECTORY ;chmod 700 $DIRECTORY  fi'<br /><br /># copy the key<br />scp $DIRECTORY/id_dsa.pub $1:~/.<br /><br /># install the key<br />ssh $1 'cat id_dsa.pub &gt;&gt; $DIRECTORY/authorized_keys'<br />ssh $1 'chmod 600 $DIRECTORY/authorized_keys '<br /><br /># remove the public key you just copied<br />ssh $1 'rm ~/id_dsa.pub'<br />eddie@oedt01:~/bin$ cat installkey.sh<br /># invoke with ./Installkey.sh servername<br /><br /># set up the .ssh dir if it does not exists<br />DIRECTORY=",ssh"<br />ssh $1 'if [ ! -d "$DIRECTORY" ];  then  mkdir $DIRECTORY ;chmod 700 $DIRECTORY  fi'<br /><br /># copy the key<br />scp $DIRECTORY/id_dsa.pub $1:~/.<br /><br /># install the key<br />ssh $1 'cat id_dsa.pub &gt;&gt; $DIRECTORY/authorized_keys'<br />ssh $1 'chmod 600 $DIRECTORY/authorized_keys '<br /><br /># remove the public key you just copied<br />ssh $1 'rm ~/id_dsa.pub'<br />

Then you will want to use cssh to manage several systems  at once.


Sshkey install update.

Wrote a script a while back to put your ssh key on a remote system so you do not have to type in the password all the time. Found a few shortcomings with it and now have updated it. You will have to type in your password to login and complete the script process.


# invoke with ./Installkey.sh servername

# set up the .ssh dir if it does not exist
ssh $1 ‘if [ ! -d "$DIRECTORY" ];  then  mkdir $DIRECTORY ;chmod 700 $DIRECTORY ; fi’

# copy the key
scp $DIRECTORY/id_dsa.pub $1:~/.

# install the key
ssh $1 ‘cat id_dsa.pub >> $DIRECTORY/authorized_keys’
ssh $1 ‘chmod 600 $DIRECTORY/authorized_keys ‘

# remove the public key you just copied
ssh $1 ‘rm ~/id_dsa.pub’


Not a fan of C++, but my br9ohter put up a Microsoft  example for hist students to solve. Of couorce I wanted to solve it using linux,

#include <iostream>

using namespace std;

int main() {

int length;
int width;

cout << "Enter the width: ";
cin >> width;

cout << "Enter the length:" ;

cin >> length;

cout <<"the area is: ";
cout << length * width;

cout << "\n\n";


Gedit main.cpp

eddie@oedt01:~$ g++ math.cpp -o math
eddie@oedt01:~$ ./math
Enter the width: 10
Enter the length:20
the area is: 200



There are different numbering systems. What we use most common  is base ten Computers and electronics better adapt to the bainary of base two systems. That s because only zeroes and ones are used to create munbers. Then of course numbers can be represented by light swithes. for example if you had eighr light switches will represent on and 0 will represent off/ 11011110 Huh? How can that be a number? Well it can be translated from what the machine understands to what we understand. So we can write a program htat will trans late the number from base 2 (one and zeros) to what we understand.

128  64  32  16      8  4   2   1

1        1   0   1      1   1   1   0

os that is 128 + 64+16 +8+4 +2 or 222

To make thinkgs easier we can write a program to do the translation for us.


#include <stdio.h>
int main(void)
char bin; int dec = 0;
printf("enter a binary number: ");

while (bin != '\n') {
if (bin == '1') dec = dec * 2 + 1;
else if (bin == '0') dec *= 2;

printf("The decimal number is: %d\n", dec);

return 0;


Sincomputers only understands onee and zeros, the code will have to be compliled ot translated to what the computer understands. Once we do that can can call the program to solve the problem for us.. So let’s do that.

$ gxccnumcnvrt.c -o binmath

The code was compiled, so let’s run it.

$ ./binmath
enter a binary number: 11011110
The decimal number is: 222
Whoopie the computer came up with the number we hand translated from binary to base 10.


Could of sworn I had included this quick sshkey shell file in an earlier post. Here it is again.

Wrote a script a while back to put your ssh key on a remote system so you do not have to type in the password all the time. Found a few shortcomings with it and now have updated it. You will have to type in your password to login and complete the script process.


# invoke with ./Installkey.sh servername

# set up the .ssh dir if it does not exist
ssh $1 ‘if [ ! -d "$DIRECTORY" ];  then  mkdir $DIRECTORY ;chmod 700 $DIRECTORY ; fi’

# copy the key
scp $DIRECTORY/id_dsa.pub $1:~/.

# install the key
ssh $1 ‘cat id_dsa.pub >> $DIRECTORY/authorized_keys’
ssh $1 ‘chmod 600 $DIRECTORY/authorized_keys ‘

# remove the public key you just copied
ssh $1 ‘rm ~/id_dsa.pub’


One of the things that sort of gets my gut is when peoplefeel htat something is not worth what is is. In this case it benefitted me. Was browsing at local bookstore when I happened upon the book that had calculations for electronics with codethat was in basic. Most people now a days disregurd basic as being archaic. The book was only a dollar. Could not believe app the programs that it contained.  Even if I did not use the basiclanguage to write code from this book, the basic code certainly served as pseudo code that could be used to write similar programs.Now it is much easier to write progrms to calculate values for electronic parts to be used in circuits.  The book had been a gold mine. of information.

Screenshot from 2014-01-27 03:35:37


Odds and ends:

Linux hints: http://www.instructables.com/id/Linux-hints/

Fake chicken fried steak:


Good day

Almost new years.

Leave a comment

Chit chat


Allegedly works to make a bootable usb (not tested) try at your own risk,

sudo cat XXX.iso > /dev/sdX && sudo sync

Thought I might get a free used computer for the hollidays but that did not happen.


Silverbullet media casting

Actually what I am talking about is the Google chromecast. Chromecast allows you to throw the video or other media from the Nexus 7 to an hdmi enabled device such as a newer tv or monitor. So now you can attach a larger monitor to your nexus 7 via wifi and the Chromecast. Setup is fairly easy and you should be able to do it all via the Nexus 7 using the Chrome browser with internet access. You will also need the Chromecast app from the playstore to be installed.  I now carry the Chromecast and a specially setup router with me. That is the Router is only set up to take the mac addresses or speciel identification of the devices to connect to the router. Also use wpa or better wifi encription. Not completely secure but not half bad.

Personally wish I had had it when I was teaching. For home I would probably prefer to use the Raspxbmc or the like.

Screenshot from 2014-01-02 14:00:51


While back I have made a cheap teleprompter, but you had to use the internet to take advantage of it. This software would probably work great with a touchpad as it is basically a web page that does not take up nuch room. you can find more information at: http://www.instructables.com/id/Linux-ghetto-Tele-prompter/

Screenshot from 2013-12-28 21:03:41

Example code:


body {
font-family: Helvetica,Arial,sans-serif;
font-size: 2.4em;
line-height: 1.4;
background: #000;
color: #fff;
overflow: hidden;

#speech {
position: absolute;

p {
margin: .5em;

.slide {
text-align: center;
margin: 0;
<script type=”text/javascript” src=”teleprompter.js”></script>
<div id=”speech”>

<strong>From Basic Forms to Shopping Carts</strong><br><br>
An electronic shopping cart is a critical aspect of an e-commerce business. The shopping cart is the software (or series of scripts) that allows users to select products from your Web site, save them and check out when they are done shopping. In the early stages of electronic shopping, the shopping cart was usually a basic HTML form from which a customer selected the products he  wanted to purchase. Long before using a credit card over the Internet was widely accepted, it was common to find that you would need to print the form and mail it along with a money order or credit card information to the company. Over time, as e-commerce grew and online stores began to offer hundreds, if not hundreds of thousands of products, obviously a better method for storing a customer’s purchases and placing an order was needed.</p>
The shopping cart acts as the user-interface for the customer to shop. It allows users to place items in a “shopping basket”. The cart remembers these items for a predetermined length of time, usually 15 to 30 days unless the shopper removes the items from the cart. Today’s shopping carts are really designed for the ease-of-use of the shopper. Extra features such as different color or size options, quantity of order, and matching item links can be integrated into the shopping cart. Once a shopper enters her shipping address, taxes and shipping costs can also be tallied from within the shopping cart. For the merchant, the shopping cart also provides important information, which is often transparent to the shopper, including a cart number to track the order, and even a cookie to provide you with some limited tracking details about your customer.</p>



/*global document, window, event */

var scroll = function(element) {
var scrolling = null;
var inc = 1;
var wait = 50;
var getYpos = function() {
var ypos = element.offsetTop;
var thisNode = element;
while (thisNode.offsetParent &&  (thisNode.offsetParent != document.body)) {
thisNode = thisNode.offsetParent;
ypos += thisNode.offsetTop;
return ypos;

var doScroll = function() {
var y = parseInt(getYpos(),10);
element.style.top = y;
scrolling = window.setTimeout(doScroll,wait);

var toggleScrolling = function() {
if (scrolling) {
scrolling = null;
} else {

element.onclick = toggleScrolling;

// ‘keys’ code adapted S5 (http://www.meyerweb.com/eric/tools/s5/)
//    which was in turn adapted from MozPoint (http://mozpoint.mozdev.org/)

var keys = function(key) {
if (!key) {
key = event;
key.which = key.keyCode;
switch (key.which) {
case 221:    // ]
if (scrolling) {
case 219:    // [
if (scrolling && inc>1) {
case 10:    // return
case 13:    // enter
return false;
document.onkeyup = keys;

var init = function() {
if (document.getElementById && document.getElementById("speech")) {

window.onload = init;


Recieved stuff via family from Google the last two years. Last year it was the Nexus 7 and this year it was the Chromecast. The nexus seven is fairly useful, thoughI have not taken full oadvantage of it. Loaded dosemu on the unit so I could use my old qbasic programs such as an editor, spreadsheet, and database. Was using a Daap client but removed it so I could use our mpd (music)  server. instead. .Upnp seems to work well within the same subnet. Will probably set a server just for the google stuff on a separate network so it will not be a problem with what connects to the internet. was able to cast from the nexus 7 to a vga an hdmi ready monitor. Donot like to have an extra app on machines to do that. I see security iissues there,


There was a discussion about the new portable equiment such as the Chromebook and other offerings.this was my responce:

If I got a chromebook, linux would be automatically installed. As for m$ being ethical, I guess that is why both here and in the EU, it was judged a monopoly among other things.  I can tell you of countless stories that never hit the news (MSnbc) where things were allegedly anything but kosher. Still suspicious of Gary Killdall's death. Too convenient. People also forget the shrinkwrap agreement days which was eventually found to be unconstitutional in the US. Now computers come without separate backup media which is a crock. Real smart MS. The proprietary computer industry is "so ethical" that you are not allowed to modify your equipment with breaking some stupid (s/b unconstitutional)  law. I bought it and I am NOT renting it, so I will do what I please with MY equipment AND software.

I will not purchase an item where you get locked into the techmology. That goes for Sony, Apple, MS, Google, and  or whomever. The most recent hardware offerings tend to do that and support dissipates quickly if you have not bought the latest toy,  Companies have forgotten what ROI (return on investment) means to a customer in these tight times. Planned retirement of equipment seems to be the norm. I will not mention the name of the company, but I remmember as a tech we would order replacement parts just before the warranty went out, because 99 times out of a 100 the equipment would fail as soon as the warranty expired.

Lastly, With linux and bsd, I can still use equipment that I bought over a decade ago. You can not do that with most proprietary computing devices.  Thank god they are not under the new insane licensing agreements. To that end, Software patents are a crock.


Got out the old mythtv box and updated it. made a few tweaks and all was well.



Old hardware can be used for doing electronics.


You can use the joystick port for analog input just like the Arduino. (less accurate though).



"Bad block messages" usually happens when drives will not mount or boot completely.

Checkout error for sure

dmesg | tail

[ 4324.292510] sd 3:0:0:0: [sdb] Assuming drive cache: write through

[ 4324.292521] sd 3:0:0:0: [sdb] Attached SCSI disk

[ 4327.713599] EXT4-fs (sdb1): ext4_check_descriptors: Checksum for group 1536 failed (18982!=0)

[ 4327.713612] EXT4-fs (sdb1): group descriptors corrupted!

[ 4331.946594] EXT4-fs (sdb1): ext4_check_descriptors: Checksum for group 1536 failed (18982!=0)

[ 4331.946607] EXT4-fs (sdb1): group descriptors corrupted!

[ 4342.836612] EXT4-fs (sdb1): ext4_check_descriptors: Checksum for group 1536 failed (18982!=0)

[ 4342.836625] EXT4-fs (sdb1): group descriptors corrupted!

[ 4600.601626] EXT4-fs (sdb1): ext4_check_descriptors: Checksum for group 1536 failed (18982!=0)

[ 4600.601637] EXT4-fs (sdb1): group descriptors corrupted!

Get back up blocks (if any) so problem can be resolved.  sudo mke2fs -n /dev/xxx

$ sudo mke2fs -n /dev/sdb1

mke2fs 1.42 (29-Nov-2011)

Filesystem label=

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

Stride=0 blocks, Stripe width=0 blocks

15007744 inodes, 60001024 blocks

3000051 blocks (5.00%) reserved for the super user

First data block=0

Maximum filesystem blocks=0

1832 block groups

32768 blocks per group, 32768 fragments per group

8192 inodes per group

Superblock backups stored on blocks:

32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,

4096000, 7962624, 11239424, 20480000, 23887872

Run the fix. Takes an eon. Battery backup required. sudo e2fsck -b block_number /dev/xxx

$ sudo e2fsck -b 23887872 /dev/sdb1

Group descriptor 1825 checksum is invalid.  FIXED.

Group descriptor 1826 checksum is invalid.  FIXED.

Group descriptor 1827 checksum is invalid.  FIXED.

Group descriptor 1828 checksum is invalid.  FIXED.

Group descriptor 1829 checksum is invalid.  FIXED.

Group descriptor 1830 checksum is invalid.  FIXED.

Group descriptor 1831 checksum is invalid.  FIXED.

Pass 1: Checking inodes, blocks, and sizes

Deleted inode 10882413 has zero dtime.  Fix<y>? yes

Still several more passes to make.,


An idea for a computer controlledtv antenna: http://www.instructables.com/id/Computer-controlled-OTA-TV-antenna/

Screenshot from 2013-12-28 22:08:01

EXT4-fs: group descriptors corrupted! Cannot mount disk using Ubuntu

Whaaa, Datageddon! My 2TB external just decided to stop working. “dmesg | tail” gave me the worst of the worst messages: “EXT4-fs (sda1): group descriptors corrupted!”, which translates to me as “kiss your data bye bye”…

After some searching I came across the magic terminal commands to solve the problem:

Check for backup superblocks, replace the x’s with your partition name
# sudo mke2fs -n /dev/xxx

Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208

Restore the superblock from the backup, again replacing the x’s with your partition name, and block_number with the first backup superblock
# sudo e2fsck -b block_number /dev/xxxNow just wait 1 million years for it to fnish, and you’ll have you trillions of bytes back.  :crazy:

Source: http://linuxexpresso.wordpress.com/2010/03/31/repair-a-broken-ext4-superblock-in-ubuntu/

EXT4-fs (sda1): group descriptors corrupted!
fsck.ext4: No such file or directory while trying to re-open
EXT4-fs (sdb1): group descriptors corrupted!
Error writing block 1 (Attempt to write block to filesystem resulted in short write). Possibly non-existent device?
EXT4-fs (sdc1): group descriptors corrupted!

- See more at: http://www.webdesignblog.asia/operating-systems/linux-os/ext4-fs-group-descriptors-corrupted-cannot-mount-disk-using-ubuntu/#sthash.SahAqzZc.dpuf


Using bash oversumplified to create a web page so that you do not have to go to a bunch of web pages and therefore you miss the ads.. You can find similar code for the sub programs in earlier articles.


# daily journal

echo “<html>” > report.html

echo “<body>” >> report.html

echo “<script>” >> report.html

echo “var d=new Date();” >> report.html

echo “document.write(‘<h2> Journal for ‘);” >> report.html

echo “document.write(d);” >> report.html

echo “document.writeln(‘</h2>’);” >> report.html

echo “<hr>” >> report.html

echo “</script>” >> report.html

echo “<hr>” >> report.html


# weather

echo “<h3>The weather</h3>” >> report.html

echo “<pre>” >> report.html

# creates tw

gwhtml.sh  20201 >> tw

echo “<pre>” >> report.html

cat tw >> report.html

echo “</pre>” >> report.html

# echo Journal for: $(date) >> report.html

# display weather map

echo “<img src=”http://radar.weather.gov/ridge/Thumbs/LWX.png&#8221; alt=”” width=300 height=450 />” >> report.html


# horoscope

echo “<h3>The horoscope</h3>” >> report.html

# creates h

ghphtml.sh virgo > h

echo “<pre>” >> report.html

cat h >> report.html

echo “</pre>” >> report.html

echo “</body>”  >> report.html

echo “</html>” >> report.html

Screenshot from 2013-12-27 07:55:06

You may want to get a list of airport codes for the weather like below.

Airport Codes

Browse by selecting the first letter of the city name.

United States and Canada | International

A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | Y


  • Abbotsford, BC
  • YXX
  • Abbotsford Airport
  • Aberdeen, SD
  • ABR
  • Aberdeen Regional Airport
  • Abilene, TX
  • ABI
  • Abilene Regional Airport
  • Akron / Canton, OH
  • CAK
  • Akron-Canton Regional Airport
  • Alamogordo, NM
  • ALM
  • Alamogordo-White Sands Regional Airport
  • Alamosa, CO
  • ALS
  • San Luis Valley Regional Airport
  • Albany, NY
  • ALB
  • Albany International Airport
  • Albany, GA
  • ABY
  • Southwest Georgia Regional Airport
  • Albuquerque, NM
  • ABQ
  • Albuquerque International Sunport
  • Alexandria, LA
  • AEX
  • Alexandria International Airport
  • Alexandria, LA
  • ESF
  • Esler Regional Airport
  • Allentown, PA
  • ABE
  • Lehigh Valley International Airport
  • Alliance, NE
  • AIA
  • Alliance Municipal Airport
  • Alpena, MI
  • APN
  • Alpena County Regional Airport
  • Altoona, PA
  • AOO
  • Altoona-Blair County Airport
  • Amarillo, TX
  • AMA
  • Rick Husband Amarillo International Airport
  • Anchorage, AK
  • ANC
  • Ted Stevens Anchorage International Airport
  • Arviat, NU
  • YEK
  • Arviat Airport
  • Aspen, CO
  • ASE
  • Aspen-Pitkin County Airport
  • Athens, GA
  • AHN
  • Athens-Ben Epps Airport
  • Atlanta, GA
  • ATL
  • Hartsfield-Jackson Atlanta International Airport
  • Atlantic City, NJ
  • ACY
  • Atlantic City International Airport
  • Atlantic City, NJ
  • AIY
  • Atlantic City Municipal Airport
  • Auburn/Lewiston, ME
  • LEW
  • Auburn/Lewiston Municipal Airport
  • Augusta, GA
  • AGS
  • Augusta Regional Airport at Bush Field
  • Augusta, ME
  • AUG
  • Augusta State Airport
  • Augusta, GA
  • DNL
  • Daniel Field
  • Aupaluk, QC
  • YPJ
  • Aupaluk Airport
  • Austin, TX
  • AUS
  • Austin-Bergstrom International Airport
  • Avoca, PA
  • AVP
  • Wilkes-Barre/Scranton International Airport


Soup and shoe biscuits:


Good day.

Happy hollidays.

Leave a comment

‘Twas the night before Christmas,
and while not a creature was stirring (not even an optical mouse),
/.’ers were posting & moderating with squeals of delight.
When out on the Internet there arose such a clatter,
I sprang from my keyboard to see what was the matter.
I knew in a moment it must be Alek’s Controllable Christmas Lights Webcam.
But remembered in previous years it was a hoax – /. said darn.
And then, in a twinkling, I realize Alek has done it for real — W’OH!
With 20,000 lights plus giant inflatable Elmo, Frosty, Santa, SpongeBob, and Homer Simpson — D’OH!
The X10 controls and 3 live webcams provide such clarity,
that it has raised over $70,000 for Celiac charity.
‘Merry Christmas to all, and to all a good night!’”

Getting close to the holidays.

Leave a comment

chit chat


One thing I like about linux iws that should say something like the video driver foobard, you do not have to reinsall the whole operating system. You just resovle the issue from the command line.  No reinstallation from scratch.

Need to do some editing still of this article.


Simple bash scripts for NFL football.

nfl data for phase = 2 week = 14 season = 2013

Home           Score              Away

Thursday, December 5
Houston 20 – 27 Jacksonville Final
Sunday, December 8
Minnesota 26 – 29 Baltimore Final
Kansas City 45 – 10 Washington Final
Buffalo 6 – 27 Tampa Bay Final
Miami 34 – 28 Pittsburgh Final
Detroit 20 – 34 Philadelphia Final
Oakland 27 – 37 NY Jets Final
Cleveland 26 – 27 New England Final
Atlanta 21 – 22 Green Bay Final
Indianapolis 28 – 42 Cincinnati Final
Tennessee 28 – 51 Denver Final
Seattle 17 – 19 San Francisco Final
NY Giants 14 – 37 San Diego Final
St. Louis 10 – 30 Arizona Final
Carolina 13 – 31 New Orleans Final
Monday, December 9
Dallas 28 – 45 Chicago Final


Script 1:

# Score  Grabber
# Assignments
# ——————————–
# phase 1 is preseason phase 2 is regular season phase 3 is
#finished week = 1 unfinished week = 0
# end assignments
# Get data file
case $weekfinished in
elinks “http://sports.yahoo.com/$league/scoreboard/?week=$week&phase=$phase&season=$season”  > $datafile
elinks “http://sports.yahoo.com/$league/scoreboard/”  > $datafile
# Extract and display data
while read line
do fdata[$a]=$line
echo $line | grep -q “Home Score Away”
if  [ $? -eq 0 ]; then
# header
echo ————————————————
echo  $league  data for phase = $phase  week = $week  season = $season
echo ————————————————
echo ”       Home           Score              Away”
echo “”
let “flag = 1″
if [ $flag -eq 1 ]; then
echo $line | grep -q “Latest NFL Videos”
if [ $? -eq 0 ]; then
let “flag = 0″
echo $line | grep -q “Home Score Away”
if  [ $? -ne 0 ]; then
case $weekfinished in
echo $line | sed ‘s/\[.*\]//’
echo $line
let “a += 1″
done < $datafile
# footer
echo ———————————————
# End.

NFL schedule for week: 15 of season = 2013

Week 15

Thursday, Dec. 12

San Diego Chargers at Denver Broncos, 8:25

Sunday, Dec. 15

Washington Redskins at Atlanta Falcons, 1

Chicago Bears at Cleveland Browns, 1

Houston Texans at Indianapolis Colts, 1

Buffalo Bills at Jacksonville Jaguars, 1

New England Patriots at Miami Dolphins, 1

Philadelphia Eagles at Minnesota Vikings, 1

Seattle Seahawks at New York Giants, 1

New Orleans Saints at St. Louis Rams, 1

San Francisco 49ers at Tampa Bay Buccaneers, 1

Arizona Cardinals at Tennessee Titans, 1

New York Jets at Carolina Panthers, 4:05

Kansas City Chiefs at Oakland Raiders, 4:05

Green Bay Packers at Dallas Cowboys, 4:25

Cincinnati Bengals at Pittsburgh Steelers , 8:30*

Monday, Dec. 16

Baltimore Ravens at Detroit Lions, 8:40


Script 2

# Nfl schedule  Grabber
# Assignments
# ——————————–
# phase 1 is preseason phase 2 is regular season phase 3 is
# end assignments
# Get data file
elinks http://www.usatoday.com/story/sports/nfl/2013/04/18/week-by-week-2013-nfl-schedule/2093613/ > $datafile
# Extract and display data
while read line
do fdata[$a]=$line
echo $line | grep -q “Week $week”
if  [ $? -eq 0 ]; then
# header
echo ————————————————
echo  NFL schedule for week: $week of season = $season
echo ————————————————
let “flag = 1″
let nextweek=$week+1
echo $line | grep -q “Week $nextweek”
if [ $? -eq 0 ]; then
let “flag = 0″
if [ $flag -eq  1 ] ;  then
echo $line
let “a += 1″
done < $datafile
# footer
echo ———————————————
# End.


Couple of dumb scripts  using Hak5.

Script 1

#   New hak5 episode?
cp $file1 $file2
elinks “revision3.com/hak5/episodes”  > $file1
# diff_file=diffed
# diff  $file1 $file2 | grep “<” | sed ‘s/^<//g’ > $diff_file
# cat diff_file
I=`wc -c $file1 | cut -d’ ‘ -f1`
J=`wc -c $file2 | cut -d’ ‘ -f1`
if [ $I -ne $J ]
echo new episode
echo new episode at $date > hak5lastupdate
echo no new episode

Hak5 episodes

All Episodes

* Point to Point Pineapple mesh continued. Decibels to Watts,
antenna polarization, “cable loss” and why HAMS get all the good…

Point to Point Pineapple Mesh Continued and Syncing with

* Learn the ins and outs of EIRP, 2.4 GHz and the legal way to
balance radio output with antenna gain. This episode is…

Legally build a 60 Watt WiFi Link – 2.4 GHz and EIRP

* This week we go behind the scenes at the  Studio during our
recent studio upgrades. Also Shannon explores some of the…

Upgrading the Studio and Chromecast Tricks

* This week Darren interviews Craig Heffner on his research in to
backdoors on routers. Also find Shannon dices into Seafile…

Discovering Hidden Backdoors In Home Routers And Storing Data With

* Darren meets Paul McMillan to see the whole internets VNC servers
in 16 minutes. Also find new was to connect to your phone…

Hidden Device Inputs Revealed!

* Wireless Packet Sniffing!!! Tracking vehicle Tire Pressure Sensor
data with Jared Boone and open source software defined…

Tracking Cars Wirelessly And Intercepting Femtocell Traffic

* Exploring the software development for the castAR with Rick
Johnson. Also seeing the hardware side of castAR with Jeri…

Creating Virtual Worlds With castAR

* The new WiFi Pineapple Mark V is unveiled at this special
launch event featuring Darren, Sebastian, Eighty of Dual…

The New WiFi Pineapple Mark V

* Session Hijacking with Raphael Mudge of Armitage, Disk Forensic
from Raspberry Pi and Custom Hacker Linux Distros from…

Derbycon 2013 Continues and Enterprise Cloud Syncing

* This time on , Darren speaks with RenderMan at Derbycon 2013
on vulnerabilities in the nextgen Air Traffic Control…

Secure Messaging and Air Traffic Control Hacking

* Syncing files with BitTorrent Sync and alternative ways to Sneaker
Net files using optics and audio! All that and more, this…

Alternative Sneaker Nets and BitTorrent Syncing

* Cheap Kali Linux Laptop with a Raspberry Pi, a Lapdock and Custom
Cables – Shannon Morse reports. Then, Persistently…

Kali Linux Raspberry Pi Laptop and Hijack Windows Password

* The latest NSA leaks outline a massive program against internet
encryption. What is safe anymore? Can you trust PGP? How do…

Setup Your Own Private Cloud and Air Gaps

* Cracking Windows passwords in 15 seconds or less with a special
USB Rubber Ducky firmware and mimikatz. Build your own…

Install OwnCloud and Cracking Passwords with a Rubber Ducky

* Windows exfiltration with a USB thumb drive and a USB Rubber
Ducky and Benchmarking Your Linux Systems. All that and more…

How to Benchmark Your Linux System And Exfiltration Ducky

* Running the occasional Windows program with out cramping your
Linux lifestyle, Windows exfiltration with the USB Rubber…

What’s Up with the Duck?


Script 2:

# Latest Hak5 episodes
# Assignments
# ——————————–
# end assignments
# Get data file
elinks “revision3.com/hak5/episodes”  > $datafile
# Extract and display data
while read line
do fdata[$a]=$line
echo $line | grep -q “All Episodes”
if  [ $? -eq 0 ]; then
# header
echo ————————————————
echo  Hak5 episodes
echo ————————————————
echo “”
let “flag = 1″
echo $line | grep -q “Load More”
if [ $? -eq 0 ]; then
let “flag = 0″
if [ $flag -eq  1 ] ;  then
echo $line | sed ‘s/\[.*\]//’ | sed ‘s/\Hak5//’
let “a += 1″
done < $datafile
# footer
echo ———————————————
# End.


Yet another music server.

Picture of Yet another music server.
Screenshot from 2013-12-08 15:29:59.png
Screenshot from 2013-12-08 15:33:39.png
Screenshot from 2013-12-08 15:50:30.png

Love MPD. It is both a music player and an internet radio player. You can install this on a really old machine or a new arm based linux device. Just add an amp and  speakers and you have a new age stereo that can be controlled remotely..
Make your directories where you want your music to be and then copy them there if they are not already there. Now to inbstall the basic software. You have the program itself (mpd)and a command line player to test it.(mpc)

$sudo apt-get install mpd mpc.

Sure sure your stero and or speakers are attached to the sound card and they work. Now to test it. We will do it with a radio station if you do not have any music to t4est with.

$ mpc add http://relay3.slayradio.org:8000/
adding: http://relay3.slayradio.org:8000/

$ mpc play
You should hear the radio station out of your speakers now.

Now let’s edit the config file for file location and to allow the server to be accesed from other systems. Warning this is not secure, as your better off sshing into the machine to control it.

$ sudo vim /etc/mpd.con
Change the directory where you files are (uncomment  the line also
# Files and directories #######################################################
# This setting controls the top directory which MPD will search to discover the
# available audio files and add them to the daemon’s online database. This
# setting defaults to the XDG directory, otherwise the music directory will be
# be disabled and audio files will only be accepted over ipc socket (using
# file:// protocol) or streaming files over an accepted protocol.
# music_directory               “/var/lib/mpd/music”

If you want to access the machine remotely you will need to change the hostname to the nmae of the michine, Warning: people will be albe to telnet into the machine unless you password protect the system.
# This setting sets the address for the daemon to listen on. Careful attention
# should be paid if this is assigned to anything other then the default, any.
# This setting can deny access to control of the daemon. Choose any if you want
# to have mpd listen on every address
# For network
# bind_to_address               “localhost”


# Permissions #################################################################
# If this setting is set, MPD will require password authorization. The password
# can setting can be specified multiple times for different password profiles.
#password                        “password@read,add,control,admin”
# This setting specifies the permissions a user has who has not yet logged in.
#default_permissions             “read,add,control,admin”

There are other settings, but I will let you check that out your selves..

NOw to access the system form other machines. There is a client for about every system known to man. You can check them out yourself at:

Screenshot from 2013-12-08 16:25:45.png


To ad a radio station, you most likely yhave to an a url.


Picture of Firefly

$ sudo apt-get install forked-daapd

Installation instructions for forked-daapd

There are two ways to install forked-daapd: from a tarball or from the git
tree. The tarball contains a working build system and pre-generated ANTLR3
parsers; the git tree doesn't and requires more tools to generate the build
system and the ANTLR3 parsers.

In both cases the installation procedure is the traditional ./configure;
make; make install. Please read this file carefully before proceeding.

System-specific requirements:
 - Linux:
   + glibc 2.13+ (bugfix: process-wide setgroups(), glibc BZ#10563)
   + libasound (ALSA sound support - or you can use OSS4)
 - FreeBSD:
   + OSS4 sound support
   + libiconv

 - The clang C compiler from the LLVM project. forked-daapd uses Blocks,
   an extension to the C language that is not supported by gcc. Along with
   clang, you'll also need the Blocks runtime, libblocksruntime.

 - pkg-config
 - gperf 3.x
        from <http://www.gnu.org/software/gperf/>

 - libantlr3c (ANTLR3 C runtime, version 3.2 for tarball builds)
        from <http://www.antlr.org/download/C>
 - Avahi client libraries (avahi-client), 0.6.24 minimum
        from <http://avahi.org/>
 - sqlite3 3.5.0+ with unlock notify API enabled (read below)
        from <http://sqlite.org/download.html>
 - libav 0.6+/0.7+ (or ffmpeg 0.5.1+)
        from <http://libav.org/releases/>
 - libconfuse
        from <http://www.nongnu.org/confuse/>
 - libdispatch
        /!\ Read below
 - libtre
        from <http://laurikari.net/tre/download/>
 - libavl
        /!\ Read below
 - MiniXML (aka mxml or libmxml)
        from <http://minixml.org/software.php>
 - gcrypt 1.2.0+
        from <http://gnupg.org/download/index.en.html#libgcrypt>
 - zlib
        from <http://zlib.net/>
 - libunistring 0.9.3+
        from <http://www.gnu.org/software/libunistring/#downloading>
 - libflac (optional - FLAC support)
        from <http://flac.sourceforge.net/download.html>
 - taglib (optional - Musepack support)
        from <http://developer.kde.org/~wheeler/taglib.html>
 - libplist 0.16+ (optional - iTunes XML support)
        from <http://github.com/JonathanBeck/libplist/downloads>

If using binary packages, remember that you need the development packages to
build forked-daapd (usually named -dev or -devel).

libdispatch for Linux and its dependencies can be found in the Debian archive;
you need at least libdispatch from SVN rev 197 + Debian patches (Linux support),
libkqueue 0.9.2 and libpthread_workqueue 0.7. At this time, it's probably
easiest to use whatever versions happen to be in Debian unstable.

libavl is not the GNU libavl. There doesn't seem to be an upstream website
anymore, but you'll find the source tarball alongside the forked-daapd
release tarballs (see below for the URL). Alternatively, you can fetch it from
any Debian mirror, too (it'll be in /debian/pool/main/liba/libavl).

sqlite3 needs to be built with support for the unlock notify API; this isn't
always the case in binary packages, so you may need to rebuild sqlite3 to
enable the unlock notify API (you can check for the presence of the
sqlite3_unlock_notify symbol in the sqlite3 library). Refer to the sqlite3
documentation, look for SQLITE_ENABLE_UNLOCK_NOTIFY.

Note about libav (ffmpeg)

libav (ffmpeg) is a central piece of forked-daapd and most other FLOSS
multimedia applications. The version of libav you use will potentially have a
great influence on your experience with forked-daapd.

The following versions of libav (ffmpeg) are supported and known to work:
 - ffmpeg 0.5.x: has issues with metadata (tags) extraction, notably with
   MP3 files and ID3 tags in general;
 - libav 0.6.x: known to work better with regard to metadata extraction;
 - libav 0.7.x: better yet

Note that forked-daapd uses libav since the ffmpeg/libav fork during the
0.6.x series.

Building from the git tree

Gitweb: <http://git.debian.org/?p=users/jblache/forked-daapd.git>
Git tree: <git://git.debian.org/users/jblache/forked-daapd.git>

Required tools:
 - ANTLR v3 is required to build forked-daapd, along with its C runtime
   (libantlr3c). Use at least version 3.1.3 of ANTLR v3 and the matching
   C runtime version.

 - Java runtime: ANTLR is written in Java and as such a JRE is required to
   run the tool. The JRE is enough, you don't need a full JDK.

 - autotools: autoconf 2.63+, automake 1.10+, libtool 2.2. Run autoreconf -i
   at the top of the source tree to generate the build system.

 - gettext: libunistring requires iconv and gettext provides the autotools
   macro definitions for iconv.

Start by generating the build system by running autoreconf -i. This will
generate the configure script and Makefile.in.

The configure script will look for a wrapper called antlr3 in the PATH to
invoke ANTLR3. If your installation of ANTLR3 does not come with such a
wrapper, create one as follows:

  exec /path/to/java -cp $CLASSPATH org.antlr.Tool "@"

Adjust the CLASSPATH as needed so that Java will find all the jars needed
by ANTLR3.

The parsers will be generated during the build, no manual intervention is

Building from the tarball

Download URL: <http://alioth.debian.org/~jblache/forked-daapd/>

When building forked-daapd from a release tarball, the usual ./configure;
make; make install procedure applies.

FLAC and Musepack support are optional. If not enabled, metadata extraction
will fail on these files.

Support for iTunes Music Library XML format is optional. Use --enable-itunes
to enable this feature.

Recommended build settings:
 ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-flac --enable-musepack

After installation, edit the configuration file, /etc/forked-daapd.conf and
adjust the values at your convenience.

forked-daapd will drop privileges to any user you'll specify in the
configuration file if it's started as root. It's recommended to create a
dedicated user without login privileges.

This user must have read permission on your library (you can create a group for
this and make the user a member of the group, for instance) and read/write
permissions on the database location ($localstatedir/cache/forked-daapd by

You'll need an init script if you want to start forked-daapd at boot. A simple
init script will do, forked-daapd daemonizes all by itself and creates a
pidfile under /var/run. Different distributions have different standards for
init scripts and some do not use init scripts anymore; check the documentation
for your distribution.

For dependency-based boot systems, here are the forked-daapd dependencies:
 - local filesystems
 - network filesystems, if needed in your setup (library on NFS, ...)
 - networking
 - NTP
 - Avahi daemon

The LSB header below sums it up:

# Provides:          forked-daapd
# Required-Start:    $local_fs $remote_fs $network $time avahi
# Required-Stop:     $local_fs $remote_fs $network $time
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: media server with support for RSP, DAAP, DACP and AirTunes
# Description:       forked-daapd is an iTunes-compatible media server for
#                    sharing your music library over the local network with RSP
#                    clients like the SoundBridge from Roku and DAAP clients like
#                    iTunes. It can also stream music to AirTunes devices.


Picture of Squeezebox multimedia server.
Screenshot from 2013-11-23 02:36:40.png
Screenshot from 2013-11-23 02:43:41.png
Screenshot from 2013-11-23 03:16:37.png
If you do not need a fancy media server then the logitech media server aka squeezebox is a good choice.You can get fancy equipment from logitech, but they are nice enough to allow you to use their software lon a server. The software I think is available for the tradiotnal platforms. We will be using linux and an old Pentium two computer.

You need two pieices of software depeding on what your system had. Our pentium II is a minimal command line headless box.Do not let the command line scare you. Once we do the install everything will be done from a web browser.

Get the squeezebox software for the 32 bit intel based computer.  (http://www.mysqueezebox.com/download)

Install the software.

$ sudo dpkg -i logitechmediaserver_7.7.3_all.deb

Needed some sound libraries if you do not use your computer for multimedia.

$ wget http://www.deb-multimedia.org/pool/non-free/w/w32codecs/w32codecs_20110131-dmo2_i386.deb

Install the package.

$ sudo dpkg -i w32codecs_20110131-dmo2_i386.deb

Make a directory to hold your media,

$ sudo mikdir -P /var/media/

Copy your media files to that folder. (It is ok to use sub-folders.)

Now to the web.

Point your browser to squeezeboxhostname using a port of 9000.

In my case:


You will need to setup a username and password if you do not already have one.  There is a like to the site to do that.

Log in:

Then you can set things up to look at the directory you setup to hold your media.  Then just modify the settings to what you prefer.
Save them.

Add the media to the play list. It is all point and click.

S that takes care of the server side.

Now you need to go to your media player, In my case it was an Insignia infocast with third party firmware. You will go to where the squeeeze box application is.Enter in the address of your server.

In my case it is:

Spelling is critcial here.


Now just tell your squeezebox client to play. Voila you have media. In my case it was music files.being played.


We decided to make a very crude version of the famous  #ClearTV #antenna. We were able to get over 50 channels. Not bad for a couple pieces of foil. #Cablecutters


Gui vs keyboard:

Not so long ago at least for me Mainframe, C=64, Apple ][, Trs-80, MSDOS, CPM, and Unix  was all command line. When gui interaces first came out ,users screamed bloody murder if they had to use a mouse. Now if you sugggest using the command line aka keyboard, you get the same bloody murder reaction. Reminds me of the Star trek movie where Scotty tried to talk to a computer and found  that he had to use the keyboard.

[faced with a 20th century computer]
Scotty: Computer! Computer?
[He's handed a mouse, and he speaks into it]
Scotty: Hello, computer.
Dr. Nichols: Just use the keyboard.
Scotty: Keyboard. How quaint.



Cooking math ?

Being new in the  #kitchen    was not sure how much flling I needed to fill a 9 inch pie crust pan, Could #mathematics solve the problem? A pie pan is sort of a frustrum (cut off cone). We needed the volume of a pie pan, so we used the formula: V = ((3.14*h)/3)(R^2 + Rr + r^2) or V = ((3.14*1)/3)((4.5 * 4.5) + (4.5 * 3.5) + (3.5*3.5)).That equates to about 50 square inches or about 3.5 cups (50.5*0.0693=3.49965 ). .Off to the store.

Screenshot from 2013-12-05 05:54:11


Late thanks givint dinner.


Bood day.

Playing around.

Leave a comment

Chit chat


Working on the Rpi pc. more details at: http://www.instructables.com/id/Raspberry-Pi-Jack-of-all-trades/


Printing on linux is so much fun. Used a web browser for accessing Cups to set up a printer on my server from my desktop.  The Cups software easily found the network printer. and after I chose a driver, the driver was installed without ever having to load a single cd or restart a computer. Was printing in just a few minutes.
You need to change a  few settings. First back up your settings file.
# Only listen for connections from the local machine.
Listen localhost:631
Listen /var/run/cups/cups.sock
# Listen on the LAN interface, Port 631 (IPP) local host  address
# Show shared printers on the local network.
Browsing Off
BrowseOrder allow,deny
BrowseAllow all
BrowseLocalProtocols CUPS dnssd
BrowseAddress @LOCAL

# Default authentication type, when authentication is required...
DefaultAuthType Basic

# Web interface setting...
WebInterface Yes

# Restrict access to the server... (to local network)
Order allow,deny
Allow from 192.168.1.*
$ sudo cp /etc/cups/cupsd.conf /etc/cups/cupsd.conf.original
Then you need to write protect the file.
$ sudo chmod a-w /etc/cups/cupsd.conf.original
And lastly you need to add settings in the settings file to let the interface be accessible.

Just change whatever you need to. Theun with your browser go to


The E02 Pogoplug and Archlinux.

Became tired of the Pogoplug cloud, so I decided that I could make more use of it as a local server. There a few lines to type in which frustrates a lot of people. I decided to takke a shortcut and use the web and the command lone together to make things easier.

You will go to the page where the commands are. Copy a command at a time and then paste it in the terminal that is connected to the pogoplug.

Once you finnish the install, you may want to add other softwareto mkae the unit more usable. here is a basic install I sort of used.

Warning: do this at your own risk, There are several models of the pogoplug. this only works on one version only of the unit. Will not be responcible for any or all issues.

Pogoplug v2 (Pink/Gray)

  • Overview and Installation
The Pogoplug v2 is the second device from CloudEngines to feature Pogoplug software. It excelled where the original Pogoplug was lacking by including 4 USB ports and a more noticeable hardware profile.The gray Pogoplug was introduced at a later time to better fit in with users’ existing components, which were not as pink as the original Pogoplug v2.

Recently, Cloud Engines has began shipping new Pink Pogoplugs with model numbers POGO-B01/02/03/04/P21 – these are completely different devices and you should NOT follow the guide on the installation tab above. Look in the “ARMv6″ section for these models, or click here.

Supported Model Numbers:



  • VERIFY YOUR MODEL NUMBER! These instructions only apply to models POGO-E02 and POGO-E02G.
  • These instructions will void your warranty. While every precaution is taken to ensure nothing bad happens, all actions are at your own risk.
  • my.pogoplug.com, the mobile applications, and the desktop Pogoplug connector will no longer work.
  1. With the device on and online, attempt to SSH to the IP the device received through DHCP. If you are unable to SSH, register and enable SSH through my.pogoplug.com. The default login (unless changed through my.pogoplug.com) is root/ceadmin.
  2. Stop the Pogoplug software, so it doesn’t interfere with the install process:killall hbwd You only need to kill the Pogoplug service the first time you SSH in. Running the installer in the following steps disables it completely.
  3. While connected via SSH to your plug, copy, paste, and run the following commands to download a bootloader that can boot from USB drives:cd /tmp wget http://jeff.doozan.com/debian/uboot/install_uboot_mtd0.sh chmod +x install_uboot_mtd0.sh ./install_uboot_mtd0.sh After the new bootloader is installed, you will need to use fdisk to partition a storage device. Plug in a 1GB or bigger USB drive. REMOVE ALL OTHER DRIVES. Move everything you need off of the Arch Linux ARM drive and back it up. Everything on the USB drive with be deleted and replaced with Arch Linux ARM.
  4. Set the U-Boot variable to tell the kernel to use ext3:/usr/sbin/fw_setenv usb_rootfstype ext3
  5. Start fdisk on the USB drive:/sbin/fdisk /dev/sda
  6. At the fdisk prompt, delete old partitions and create a new one:
    1. Type o. This will clear out any partitions on the drive.
    2. Type p to list partitions. There should be no partitions left.
    3. Now type n, then p for primary, 1 for the first partition on the drive, and then press ENTER, accepting default values.
    4. Exit by typing w.
  7. Now create the ext3 filesystem:wget http://archlinuxarm.org/os/pogoplug/mke2fs chmod 755 mke2fs ./mke2fs -j /dev/sda1 mkdir usb mount /dev/sda1 usb
  8. Download and install Arch Linux ARM:cd usb wget http://archlinuxarm.org/os/ArchLinuxARM-armv5te-latest.tar.gz tar -xzvf ArchLinuxARM-armv5te-*.tar.gz # This will take a long time rm ArchLinuxARM-armv5te-*.tar.gz sync # Takes a while when using a flash drive
  9. Clean up and reboot. Cross your fingers and hope for the best.cd .. umount usb /sbin/reboot
  10. The SSH key of your device will be different, so you need to tell Mac OS X or Linux to remove it from ~/.ssh/known_hosts before using SSH again:ssh-keygen -R # Use your device’s IP
  11. Log back in after your Pogoplug reboots using username root and password root.


With the device on and online, attempt to SSH to the IP the device received through DHCP. If you are unable to SSH, register and enable SSH through my.pogoplug.com. The default login (unless changed through my.pogoplug.com) is root/ceadmin. Stop the Pogoplug software, so it doesn’t interfere with the install process:killall hbwd You only need to kill the Pogoplug service the first time you SSH in. Running the installer in the following steps disables it completely.     While connected via SSH to your plug, copy, paste, and run the following commands to download a bootloader that can boot from USB drives:

# cd /tmp

# wget http://jeff.doozan.com/debian/uboot/install_uboot_mtd0.sh

# chmod +x install_uboot_mtd0.sh

# ./install_uboot_mtd0.sh

After the new bootloader is installed, you will need to use fdisk to partition a storage device. Plug in a 1GB or bigger USB drive. REMOVE ALL OTHER DRIVES. Move everything you need off of the Arch Linux ARM drive and back it up. Everything on the USB drive with be deleted and replaced with Arch Linux ARM. Set the U-Boot variable to tell the kernel to use ext3:

# /usr/sbin/fw_setenv usb_rootfstype ext3

Start fdisk on the USB drive:

# /sbin/fdisk /dev/sda

At the fdisk prompt, delete old partitions and create a new one:

Type o. This will clear out any partitions on the drive.

Type p to list partitions. There should be no partitions left.

Now type n, then p for primary, 1 for the first partition on the drive, and then press ENTER, accepting default values.

Exit by typing w.

Now create the ext3 filesystem:

# wget http://archlinuxarm.org/os/pogoplug/mke2fs

# chmod 755 mke2fs

# ./mke2fs -j /dev/sda1

# mkdir usb

# mount /dev/sda1 usb

Download and install Arch Linux ARM:

# cd usb

# wget http://archlinuxarm.org/os/ArchLinuxARM-armv5te-latest.tar.gz

# tar -xzvf ArchLinuxARM-armv5te-*.tar.gz

This will take a long time

# rm ArchLinuxARM-armv5te-*.tar.gz

# sync

Takes a while when using a flash drive Clean up and reboot. Cross your fingers and hope for the best.

# cd ..

# umount usb

# /sbin/reboot

The SSH key of your device will be different, so you need to tell Mac OS X or Linux to remove it from ~/.ssh/known_hosts before using SSH again:

# ssh-keygen -R

Use your device’s IP.  Log back in after your Pogoplug reboots using username root and password root.

Installation FAQ

  • I ran through the installer, have everything where it should be on the USB drive, but it’s still not working.Try booting again. This often does the trick. If that does not help, try using a different USB drive. Flash drives have proven to not work well with running a full operating system, a USB hard drive is the best option.
  • fw_printenv/fw_setenv is no longer working.Run the install_uboot_mtd0.sh script from within Arch Linux ARM. It will install the applications for you.




Marvell Kirkwood 1.2GHz










Just a little circuit I was thinking of using as a power supply for low voltage applications

Screenshot from 2013-11-03 22:17:36


An author had a circuit for a temp sensor as seen here (from http://www.instructables.com/id/DIY-Miniature-Thermometer/) :

So I redid it to see if I could make more sense of it,

Here is the author’s code if you wnat to try it.



Never hurts to have a backup computer if your main computer has problems.


Computing sure has changed.

Screenshot from 2013-11-08 17:09:10


Update to megaphone add-on.

Screenshot from 2013-11-14 03:10:51




Good day.

Almost spooky time.

Leave a comment

Chit chat


Thanx to the IBM website for having information that helped me solve a cobol issue. Cobol? Yes I run it on an Nslu2 with Debian linux. It just works. In pic formats us z’s to suppress zeros.

Experimenting with some ecg circuits.



Decided to put some old heat sensors work with linux via Digitemp. The command names have changed a bit.

From two of the more popular sites: (note: 25 pin connectors will use different connections.)




Temperature sensing with linux:  http://pihost.us/~stacato/digitemp/

You should be able to install digitemp from the repo without have to download the software and manually installing it.

Debian based:
$ sudo apt-get install digitemp

Fedora based:
$ sudo yum install digitemp


$ sudo apt-get digitemp

Once inststalled You can use

$ sudo digitemp_DS9097u -s /dev/ttyUSB0 -w

Now, to read the temperatures. You’ll want the digitemp package, which is pre-packaged in Debian and probably most other Linux distributions. Once it’s installed, you’ll need to know what program to use. Several are available for different DS masters, but in the LinkUSBi’s case, you’ll want digitemp_DS9097U. To begin, verify the bus is working correctly by walking it:

# digitemp_DS9097U -w -s /dev/ttyUSB0
DigiTemp v3.5.0 Copyright 1996-2007 by Brian C. Lane
GNU Public License v2.0 - http://www.digitemp.com
Turning off all DS2409 Couplers
Devices on the Main LAN
28D1483C0200002F : DS18B20 Temperature Sensor
28E9393C020000C3 : DS18B20 Temperature Sensor
010EBED512000046 : DS2401/DS1990A Serial Number iButton

This shows the two DS18B20 temperature sensors (T-Sense probes), as well as the DS2401 embedded in my LinkUSBi. (The DS2401 literally does nothing but return a serial number. Still, as mentioned before it’s useful to have to verify the bus is working correctly even if no other devices are plugged into it.)

Next you’ll want to create a config file. I chose to store it in /etc/digitemp.conf.

# digitemp_DS9097U -i -c /etc/digitemp.conf -s /dev/ttyUSB0
DigiTemp v3.5.0 Copyright 1996-2007 by Brian C. Lane
GNU Public License v2.0 - http://www.digitemp.com
Turning off all DS2409 Couplers
Searching the 1-Wire LAN
28D1483C0200002F : DS18B20 Temperature Sensor
28E9393C020000C3 : DS18B20 Temperature Sensor
ROM #0 : 28D1483C0200002F
ROM #1 : 28E9393C020000C3
Wrote /etc/digitemp.conf

You will be left with a file called /etc/digitemp.conf that looks something like this:

TTY /dev/ttyUSB0
LOG_FORMAT "%b %d %H:%M:%S Sensor %s C: %.2C F: %.2F"
CNT_FORMAT "%b %d %H:%M:%S Sensor %s #%n %C"
HUM_FORMAT "%b %d %H:%M:%S Sensor %s C: %.2C F: %.2F H: %h%%"
ROM 0 0x28 0xD1 0x48 0x3C 0x02 0x00 0x00 0x2F 
ROM 1 0x28 0xE9 0x39 0x3C 0x02 0x00 0x00 0xC3

You can rearrange the ROM mappings as you’d like. 1-Wire refers to devices by their 64-bit IDs; the numeric mappings are for digitemp’s benefit. In my case, 28D1483C0200002F is the probe I’d like to use, so #0 is fine.

Now, let’s see what’s being returned:

# digitemp_DS9097U -q -c /etc/digitemp.conf -a
Mar 04 22:22:43 Sensor 0 C: 25.38 F: 77.67
Mar 04 22:22:44 Sensor 1 C: 27.56 F: 81.61

Great, works fine. We’ll soon need the data in a machine-readable format, so here’s how to do that:

# digitemp_DS9097U -q -c /etc/digitemp.conf -o 3 -a
0	77.79	81.50


Yet another antenna: (unmounted)



Learning electronics. This was the first kind of circuit I ever put together. Decided to recreate it the astable multivibrator. Discrete parts can be a bonus sometimes.


Parts used:

2 – leds (different colors adds more mystique)
2 – 330 ohm resistors
2 – 10k ohm resistors
2 – 2n2222 transistors (npn)
2 – 100uf  50v Electrolytic capacitors
1 – 3 volt battery

Blinks fairly fast. You can exhange parts to see what it can do. The actual circuit:

What should happen: (different circuit, but essentially the same still using npn transistors.)


 Working on a microcontrolled audio switcher you can access from the web. Still have to add 32 audio lines.
Dear #Ubuntu. Some of us use command line only machines. so the loss of alsamixer is a reaL PAIN. Gnome-alsamixer is useless for us. Guess i will have to look for the source and compile it for the system. Or just wait and  replace u12.04 with a real linux.
Recently upgraded the server to U12.04. Would have prefered to replace it with something else, but there are too many web applications to reinstall. The upgrade seemed to go well. Now that have had a chance to use the machine, there apps missing that WERE installed before the upgrade. So now if is a matter of reinstalling some programs.
Like to use the system without a gui. that is everything is done from the command line. That might seem like a pain, but it really is easier. That is especially tru if you have a lot of jobs scripted as we do. Went to fire up some music to play from the server (speakers are attached). All  I got was an error.  Ugh,,,,
First thing to do is to check for the sound card.
$ alsactl init
Got an error of no card. Then tried to run alsamixer. it was no longer installed after the upgrade.
For grins, I tried to get some speech but that failed also.
$ echo I love Rita | festival –tts
Started to install pulseaudio, but thought better of it. Went  over to the server to see if the sound card was still installed.  It looked like it was till I looked closer. Some how the daughterboard that hols the sound card had come loose. Ugh, Shut the machine down and reinstalled the daughterboard. Restarted the system.
$ alsactl init
Found hardware: “CMI8738″ “CMedia PCI” “” “0x13f6″ “0×0111″
Hardware is initialized using a generic method
That was a good sign.
Then I tried to play a song or too but mplayer was not installed. Went and reinstalled it. Had it before the upgrade. Now to try again.
$  mplayer Light*
At last sound…..
Then I realized the path command was abreviated as it did not have my local bin directory included in the path. Time to fix that.
$ echo $PATH
$ export PATH
$ echo $PATH
Retested the voice synthesis and now the computer talks again. Great for use to let you know issues for good things about the system,
$ echo I love Rita | festival –tts
Resintalled Freebasic and compiled some programs that control led’s on the parallel port. updated a few html pages to reflect the use of the programs.
Time to go watch some football.
Musical arduino.(from Arduino.cc

Play a Melody using the tone() function

This example shows how to use the tone() command to generate notes. It plays a little melody you may have heard before.

Hardware Required

  • Arduino board
  • 8 ohm “small” speaker
  • 100 ohm resistor
  • hook-up wire


image developed using Fritzing. For more circuit examples, see the Fritzing project page

Connect one terminal of your speaker to digital pin 8 through a 100 ohm resistor. Connect the other terminal to ground.


click the image to enlarge


The code below uses an extra file, pitches.h. This file contains all the pitch values for typical notes. For example, NOTE_C4 is middle C. NOTE_FS4 is F sharp, and so forth. This note table was originally written by Brett Hagman, on whose work the tone() command was based. You may find it useful for whenever you want to make musical notes.

The main sketch is as follows:

Plays a melodycircuit:
* 8-ohm speaker on digital pin 8created 21 Jan 2010
modified 30 Aug 2011
by Tom IgoeThis example code is in the public domain.


#include “pitches.h”// notes in the melody:
int melody[] = {

// note durations: 4 = quarter note, 8 = eighth note, etc.:
int noteDurations[] = {
4, 8, 8, 4,4,4,4,4 };

void setup() {
// iterate over the notes of the melody:
for (int thisNote = 0; thisNote < 8; thisNote++) {

// to calculate the note duration, take one second
// divided by the note type.
//e.g. quarter note = 1000 / 4, eighth note = 1000/8, etc.
int noteDuration = 1000/noteDurations[thisNote];
tone(8, melody[thisNote],noteDuration);

// to distinguish the notes, set a minimum time between them.
// the note’s duration + 30% seems to work well:
int pauseBetweenNotes = noteDuration * 1.30;
// stop the tone playing:

void loop() {
// no need to repeat the melody.

The paste in the following code into pitches.h  then save to a folder.  Then import the folder into the libraries. :

* Public Constants
#define NOTE_B0  31
#define NOTE_C1  33
#define NOTE_CS1 35
#define NOTE_D1  37
#define NOTE_DS1 39
#define NOTE_E1  41
#define NOTE_F1  44
#define NOTE_FS1 46
#define NOTE_G1  49
#define NOTE_GS1 52
#define NOTE_A1  55
#define NOTE_AS1 58
#define NOTE_B1  62
#define NOTE_C2  65
#define NOTE_CS2 69
#define NOTE_D2  73
#define NOTE_DS2 78
#define NOTE_E2  82
#define NOTE_F2  87
#define NOTE_FS2 93
#define NOTE_G2  98
#define NOTE_GS2 104
#define NOTE_A2  110
#define NOTE_AS2 117
#define NOTE_B2  123
#define NOTE_C3  131
#define NOTE_CS3 139
#define NOTE_D3  147
#define NOTE_DS3 156
#define NOTE_E3  165
#define NOTE_F3  175
#define NOTE_FS3 185
#define NOTE_G3  196
#define NOTE_GS3 208
#define NOTE_A3  220
#define NOTE_AS3 233
#define NOTE_B3  247
#define NOTE_C4  262
#define NOTE_CS4 277
#define NOTE_D4  294
#define NOTE_DS4 311
#define NOTE_E4  330
#define NOTE_F4  349
#define NOTE_FS4 370
#define NOTE_G4  392
#define NOTE_GS4 415
#define NOTE_A4  440
#define NOTE_AS4 466
#define NOTE_B4  494
#define NOTE_C5  523
#define NOTE_CS5 554
#define NOTE_D5  587
#define NOTE_DS5 622
#define NOTE_E5  659
#define NOTE_F5  698
#define NOTE_FS5 740
#define NOTE_G5  784
#define NOTE_GS5 831
#define NOTE_A5  880
#define NOTE_AS5 932
#define NOTE_B5  988
#define NOTE_C6  1047
#define NOTE_CS6 1109
#define NOTE_D6  1175
#define NOTE_DS6 1245
#define NOTE_E6  1319
#define NOTE_F6  1397
#define NOTE_FS6 1480
#define NOTE_G6  1568
#define NOTE_GS6 1661
#define NOTE_A6  1760
#define NOTE_AS6 1865
#define NOTE_B6  1976
#define NOTE_C7  2093
#define NOTE_CS7 2217
#define NOTE_D7  2349
#define NOTE_DS7 2489
#define NOTE_E7  2637
#define NOTE_F7  2794
#define NOTE_FS7 2960
#define NOTE_G7  3136
#define NOTE_GS7 3322
#define NOTE_A7  3520
#define NOTE_AS7 3729
#define NOTE_B7  3951
#define NOTE_C8  4186
#define NOTE_CS8 4435
#define NOTE_D8  4699
#define NOTE_DS8 4978


Did some more work on the Raspberry Pi PC AT makde the power connector and started on the audio/video connectors,’



Good old hotdogs,


Good day,

Older Entries


Get every new post delivered to your Inbox.