Adams Bros Blog


git text graph

Posted by Trenton

I've been looking for a really good command for making a textual graph of my repo, showing the various branches, where they come from, etc. The reason I like this one is that it's not only a graph, but it shows the branch names like 'gitk --all' does, but only the ones that are tied to tags or branches.


Backups Made Simple

Posted by Trenton

I've had complex backup solutions in the past, which I wrote myself with rsync and bash.  I've recently got sick and tired of the issues that come up now and then with them, so I decided to keep it extremely simple. So, I decided to opt for a couple of rsync only shell scripts. I get emails every time they run, as part of cron.

Filed under: Bash, Linux Continue reading


Posted by Trenton

I was recently asked the question about the conditions under which I would choose SOAP vs REST for writing a Web Service.  I was thoroughly intrigued by the question, because I was curious in which way the discussion would go, as that would tell me a lot about the other developer.


OpenLDAP SSHA Salted Hashes By Hand

Posted by Troy

I needed a way to verify that the OpenLDAP server had the correct hash recorded.  That is, a SSHA Hash Generator that I could run off the command line was in order.  After fiddling through it, I thought it would be worth documenting in a blog post.

We need to find the salt (the last four bytes of the hash), and then concatenate PASSWORD+SALT, take the SHA hash, convert to base64, prepend {SSHA}, and then finally base64 encode that whole string again.


Converting Email Files (.eml) to Thunderbird Maildir

Posted by Trenton

After a lot of effort trying to figure out how to get some of my email into Thunderbird, from simple email files, I finally figured it out. I couldn't do some of the other suggestions, as I have a lot of mail. Hopefully this saves you some pain too.


Git Recover Deleted or Staged Files

Posted by Trenton

I ran into a situation where I accidentally staged a file I didn't want to stage, and when I ran "git reset --hard" it was wiped out. After a simple google search (git recover staged files), recovering the file was simple.  I've put together a loop, which will check each commit, and look for a string "responsive", which I know is in the file.

Filed under: git Continue reading

Tora Install on Linux Mint 17

Posted by Trenton

We need to start by installing the oracle client appropriate for your architecture.  Grab the oracle instant client rpms from oracle's site.  Then run...

sudo alien --to-deb oracle-instantclient11.2-*.rpm


Enumerate All Block Devices

Posted by Trenton

I found a great little utility that can enumerate through all the block devices, including your lvm, crypt, etc.

Filed under: Crypto, Linux, LVM Continue reading

Java Script Quick Start Tips and Best Practises

Posted by Trenton

When not specified, much of this knowledge comes from Java Script Patterns by Stoyan Stefanov, and the JavaScript Pocket Reference (3rd Edition) by David Flanagan.  I personally found the JavaScript Pocket Reference to be the most valuable of the two.

This is by no means a comprehensive java script language overview, but it does provide a good bit of technical information for a beginner in the language.  It mostly just covers some key concepts that can help improve code quality, and some gotchas of the language.  It is recommended you have used Javascript a little bit prior to reading this.

I may update this from time to time.


No Space Left On Device – Linux

Posted by Trenton

So, perhaps you've seen this message, but when you check the space usage, it's just fine.  It's usually because your file system is using a whole bunch of inodes.  So, if you're using your drive space for backups, and those backups require using a lot of inodes, then you'll use up your disk very quickly.

inodes are the pointers at the beginning of the disk, which point to each datablock.  They also contain extra information like file permissions, user, group, etc

Well, let's create a file system that has more inodes, so that this doesn't happen as quickly.

Filed under: Linux Continue reading