Dickbookmarklet

So recently I was tasked with building an easter egg for a website called wholesomezine(I still have no clue if it is one word or two). I wanted to have a Konami code that did something amazing yet simple. So I wrote some code that replaces all images with an arbitrary image.

The code for the image replacement is super simple. Now normally I would use a library like jquery for advanced dom manipulation, but this time I opted for pure javascript. Here's the code.

The first thing I do is create a function called changeImage. We can use the method document.querySelectorAll('img'); to select all img tags and store them to an array called image. This means any time you want to manipulate an img node, just refer to it as image[i] where i represents an integer starting at 0.

We can do a lot of things with this piece of code. We could easily make an easter egg that changes all the images to an arbitrary url. All you would have to do is call a konami code library and specify changeImage() as the callback function like so.

Or you could create a bookmarklet. A bookmarklet is a piece of javascript that gets run from a bookmark. To do this in most browsers a bookmark needs to start with javascript:. I like this template for making bookmarklets javascript:{arbitrary script};void(0); Now while you could use some arbitrary url encoding lib to take care of the url encoding, I ended up pasting my script minus the konami code bit and used this simple bookmarklet generator. I've taken the liberty of creating a readily useable bookmarklet for you. Just drag this link to your bookmarks bar to use it anywhere, or click the link and watch the images on the page change. dickbutt!

Let's encrypt

While I was on my trip to the UK, I thought it would be cool if I could could connect to my home webserver using ssl rather than using a vpn to get free encryption. So I asked my self, are there free ssl certificates available. Turns out one person is doing that. A company called startssl appears to offer free ssl certificates. And they appear to be the only ones doing it. I then wondered to my self, why do ssl certificates cost money. So it turns out it has to deal with verifying your identity or getting their root ca into browsers or something. Well this company I guess works but the lovely people at Cisco, Mozilla, and the EFF were all like SSL certificates should seriously be free and they started Let's Encrypt. Honestly this is probably the best thing since JavaScript, CSS3, and HTML5 became a thing and liberated us from silverlight and flash. They havent started issuing certificates and they don't even have their Root certificate in major browsers yet, but I have hope. In the next month or so, they will be signing certificates for people who made it in to the closed beta. I hope I make it into the beta. It would really be useful for the company I work for called WholesomeZine.

Bandcamp please give us api keys

Dear Bandcamp,

I'm working on a project for a lable called Wholesomezine. We have a radio station that has a custom player. This custom audio player plays some songs that can be purchased through your store. We would like to be able to generate buy links for the artists that have their music available on your site. It would be nice if you had an api so I wouldn't have to make a thing to scrape the front end for artist search results, then find the corresponding album so I can find it's proper store page automaticaly. You know like your search, discography, and info api end points. But you won't give out new api keys. It's too bad since people could do great things with your api. You could have custom audio players based on your backend or making a bandcamp xbmc/plex plugin, but alas you wont give out an api key.

On a side note, thank you for id3 tagging the mp3 files for streaming over the web. It makes it much easier for the people who steal files off your site.

It is truly a shame,

-Aaron Kolker

I made a thing!

I was in the process of making a snake game using pure javascript rather than using a framework like my personal favorite impact.js. This was supposed to be a bouncing square, but for some reason it wants to leave a trail. It still looks cool so yea. This gives me a few ideas to make some interesting looking things. I think I might apply some sort of color changing or something. More to come soon.

Where is mah bukkit

So a few months ago I was going to do a series on bukkit/spigot development. Well I accidentally 93MB of .rar files, and it is very dangerous. It was so dangerous that I deleted my hard drive. Anyway I have a new very large project that I'm working on. So large it required me to get the help of a friend who knows javascript and teach javascript to a friend.

It might have to deal with torrents, spotify, what.cd, cjdns, raspi, and a whole lot of "Legal, Things"

DOGE!!!!!!

░░░░░░░░░▄░░░░░░░░░░░░░░▄░░░░ So doge
░░░░░░░░▌▒█░░░░░░░░░░░▄▀▒▌░░░
░░░░░░░░▌▒▒█░░░░░░░░▄▀▒▒▒▐░░░ Many Meme
░░░░░░░▐▄▀▒▒▀▀▀▀▄▄▄▀▒▒▒▒▒▐░░░
░░░░░▄▄▀▒░▒▒▒▒▒▒▒▒▒█▒▒▄█▒▐░░░
░░░▄▀▒▒▒░░░▒▒▒░░░▒▒▒▀██▀▒▌░░░ 
░░▐▒▒▒▄▄▒▒▒▒░░░▒▒▒▒▒▒▒▀▄▒▒▌░░
░░▌░░▌█▀▒▒▒▒▒▄▀█▄▒▒▒▒▒▒▒█▒▐░░
░▐░░░▒▒▒▒▒▒▒▒▌██▀▒▒░░░▒▒▒▀▄▌░
░▌░▒▄██▄▒▒▒▒▒▒▒▒▒░░░░░░▒▒▒▒▌░
▀▒▀▐▄█▄█▌▄░▀▒▒░░░░░░░░░░▒▒▒▐░ much Stream
▐▒▒▐▀▐▀▒░▄▄▒▄▒▒▒▒▒▒░▒░▒░▒▒▒▒▌
▐▒▒▒▀▀▄▄▒▒▒▄▒▒▒▒▒▒▒▒░▒░▒░▒▒▐░
░▌▒▒▒▒▒▒▀▀▀▒▒▒▒▒▒░▒░▒░▒░▒▒▒▌░
░▐▒▒▒▒▒▒▒▒▒▒▒▒▒▒░▒░▒░▒▒▄▒▒▐░░
░░▀▄▒▒▒▒▒▒▒▒▒▒▒░▒░▒░▒▄▒▒▒▒▌░░
░░░░▀▄▒▒▒▒▒▒▒▒▒▒▄▄▄▀▒▒▒▒▄▀░░░
░░░░░░▀▄▄▄▄▄▄▀▀▀▒▒▒▒▒▄▄▀░░░░░
░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▀▀░░░░░░░░

How not to delete your computer

So last night I fucked up. I was in my terminal in ~/.ssh when suddenly I noticed two certificates called "~" and "~.pub". I tried deleting "~" using rm. It said that it was a directory. I thought I symlinked my home folder to the .ssh directory and decided to execute "rm -rf ~". The lesson is that if you need to delete a file named "~" you need to refer to the file in quotes or refer to it as an absolute path such as "~/.ssh/~", or just use the finder. Luckily I have backblaze. The downside is that it takes forever to download over 125 gb of backups from a shitty Comcast connection.