Tuesday, January 3, 2017

Zero Bugs...

I'm currently reading 'Zero Bugs and Program Faster' by Kate Thompson. It's only 88 pages with sample 'good' code at the end by CS legends such as Knuth. I hear it's an excellent read and a quick way to improve coding skills.


Sunday, December 4, 2016

Make a Fastboot Cable

Summary


A fastboot, or factory, cable is one that allows certain devices (smartphones, kindles) to be placed in fastboot, or factory, mode for programming. If you've arrived here, you're interested in creating your own cable from electronic scraps lying around, rather than shelling out the $$ to buy it. I also created my own cable. This article is not going to recreate the "wheel" so to speak. There are multitudes of resources out there that guided me in creating my own. I will simply link back to what I used to guide me. I will, however, list some pointers for those who are new to soldering. Keep in mind that this method will only save you money if you already own the required hardware OR plan on doing more electronics projects beyond creating a fastboot cable.



Required Guides


  • Usb reference
  • Wire reference
  • This video gives a pretty good explanation with some drawings.
  • This video @ 5:25, gives a good reference on where the wires should be soldered.

Required Hardware



Optional Hardware (VERY helpful)



Tips/Suggestions


  • Remember to add flux to the wires and tin them
  • Remember to add flux to the usb pads and tin them
  • The wires and pads are TINY. The helpings hands are VERY helpful
  • Did I mention to tin the wires and pads? Trust me, it will save a LOT of frustration
  • The Hakko solder station is awesome! Save some frustration with $20 irons and get the Hakko.

My Semi-Finished Fastboot Cable


This picture is of my fastboot cable after I finished soldering it all together. I finished it off by "wrapping" in liquid electrical tape.

Wednesday, July 27, 2016

Where Did All of My Space Go!?

Yes, I have been there and chances are you have too. You're trying to run an application or service on your Linux machine and it fails due to lack of space. Granted, being low on space is typically a valid problem. However, at times you KNOW you have so many terabytes of space available and yet your application complains there is no space. This is usually due to the application using only a certain partition and/or directory out of all that space. In any case, you will have to either clean up the drive, or purchase a larger drive. I use the Disk Usage command with some flags to locate the partitions and/or directories with the most used space which I then clean up. Run the following as root (or preface the command with sudo as non-root user with sudo priveleges).
du -sh /*
You will get an output similar to the below.
[user1@myserver ~]$ sudo du -sh /* --exclude='/proc'
4.0K /applications-merged
0 /bin
6.7M /boot
0 /dev
16M /etc
685G /home
0 /lib
16K /lost+found
4.0K /media
20K /mnt
24K /node.conf.sample
14M /opt
1.1M /root
488K /run
0 /sbin
1.3G /srv
0 /sys
0 /tmp
2.5G /usr
11G /var
For more information and flag variables on the Disk Usage command, view the manpage for du. As always, if you have any pointers to add or questions please leave a comment.