Remove Duplicates in Text File

So I have a list of names, but the names are duplicated down the page. Each name is on a new line by itself. If I want to remove all the duplicates and just find out who is included in the file, I can simply do: This will remove duplicates and print them to your terminal.

WebStorm Encoded my HTML File as UTF-16BE

Well here’s the fix… You have to replace the file. First get a UTF-8 output: Then delete the file. Make a new file (already UTF-8 by default) and paste in the UTF-8 output from your terminal. Blam

Simple Shader with ThreeJS

Ok folks, it doesn’t get easier than this. If you want to start writing shaders in the browser but can’t figure out how to create your shader program, ThreeJS has you covered: In your JS   In your head:      

Finding A Pixel in Canvas Image Data

I never have time, so this will be quick. Let’s say we want to find a pixel index amoung all that image data canvas returns with: The formula is simple: Basically, you need to draw this one out. Let’s say we have a 3×3 image. Each pixel would have it’s own zero based index. The width would be three. Each

Mars VR Demo

Just wanted to post this. The source is pretty self explanatory and i’ll put up a github later once I clean up a few things. I’ll explain later. Be patient, it takes a second to load. DEMO –>

XHR Doesn’t Return responseURL in iOS8

So you’ve been making ajax calls and everything is going great. Your onSuccess message looks something like this: All of a sudden your QA professional says things aren’t working in iOS8! No prob, bob. It’s actually that iOS8 and below doesn’t return a “responseURL” attribute of the xhr object. Look at the difference: iOS8 xhr object: Everything else: Anyway…