Javascript / JQuery: Detecting the delete key

Recently I was using JQuery to detect when the delete key was pressed. I was having some issues getting it to work. I was listening to the “keypress” event, but the delete key was never detected.

    if(e.keyCode == 46) {
        alert('Delete key pressed');

After a bit of research I realized that “keyup” made more sense. “keypress” is for printable characters. “keydown” and “keyup” will capture all characters

    if(e.keyCode == 46) {
        alert('Delete key pressed');

I hope this helps someone else down the road that may be stuck on this.

Atom IDE: “EACCES, permission denied” error message

Atom IDE

EACCES, permission denied

That was the error message that I received when I was trying to update my Atom packages (I think it was linter-php). Basically, the updater was failing because it didn’t have permission to remove an old config file. The fix was simple enough. All I had to do was resign the permissions to my user by running the following command:

sudo chown -R `whoami` ~/.atom

Easy as that the permissions were fixed and the updater could do its thing again.

I used bitcoins to pay a ransom

bitcoin-hackerThis post is going to be vague in some areas to protect the identities of the parties involved.

A person I know contacted me via facebook and asked if I was still involved with bitcoin. And this is where the story begins.

This person’s friend works for a business with sensitive personal data. The businesses computers got “hacked” and  their data was encrypted. The Russian hackers were asking for $500 USD worth of bitcoins to release the data. If the demand was not met in 72 hours, the price would become $1000 USD worth of bitcoin. Finally, if the ransom was not paid within the next 72 hours period, the data on the hard drive would be destroyed.

The business was crippled because their customer data was encrypted and they needed it for their day to day tasks. Of course they didn’t have any backups of this data.

They wanted to pay the money and move on with doing business but had no idea what bitcoins were, how to acquire them or how to use them.

I was asked if I could help out and facilitate the bitcoin payment. I wanted to check off the “paid a ransom” checkbox on my bucket list, and I had never seen ransomware in person, so I agreed to help.

I had the business owner send me the $500 via paypal. Once I received the money I used my account to purchase the 1.43 BTC ($500 USD at the time).

The hackers had a website setup on a tor network (anonymous and private network of computers). The website had detailed instructions and information on how to pay the ransom. They provided a bitcoin wallet address, along with a field for a transaction number.


I used coinbase to send the bitcoins to the wallet, and entered the transaction number into the website. After a few minutes the transaction was verified and complete.

The website updated with instructions on how to download the decryption software and keys needed to recover the data and remove the ransomware from the computer. I forwarded the information on the the business owner and his staff.


An hour later I got an email from the business owner telling me that the data was recovered and thanking me for my help. Everything worked out. The business owner got his data, the hackers got their bitcoins, and I get to tell the story of how I paid a ransom to russian hackers with bitcoin.


So I’m writing a book

book_writingIn early 2013 I started writing a book.I didn’t get far before starting work on other projects.

Its August of 2014, and I’ve started working on my book again. It’s about SEO and SMO (Search Engine Optimization and Social Media Optimization). Currently it’s about 100 pages completed. I’ve started and stopped this project more that any other project in my life. Today I took some time to reflect on why it’s taking me so long to complete this task.

Through writing this book, I’ve realized that it’s difficult for me to convey my thoughts and ideas on a page. I can make it happen, but I’m very slow at it. Truthfully I am more comfortable writing computer code.

To me, code has a personality and a life of it’s own. I go to war when I code. Code does not want to run, you have to wrestle into submission. You have to understand it, you have to anticipate it. You have to imagine all of the different ways your code is going to try and elude you, and crash. Like all worthy adversaries, you must respect the code to truly understand and master it. For the code to run, you must be successful, you must be correct. The poetic dance that I experience with code, I don’t feel when writing in English. Maybe it’s the linear fashion and format.

I can say however that the research process has been fun, and stretching myself to write this book has been a great experience and a true challenge. I am passionate about seeing this project through. Here’s to the future, and here’s to completing this bad boy!