Created
August 19, 2011 07:01
-
-
Save omorandi/1156232 to your computer and use it in GitHub Desktop.
Small javascript for decoding mashape's job posting @ http://www.mashape.com/jobs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var text = '576520776f756c64206c6f766520746f2073656520796f757220636f646520696e7374656164206f6620736f6d65207061706572732c20776520646f6e27742077616e74204954206d616e61676572732c2077652077616e74207265616c206861636b6572732e20576527726520666f6375736564206f6e206368616e67696e67207468652077617920736572766963657320616e6420646174612061726520646973747269627574656420616e6420636f6e73756d65642e20496620796f752077616e7420746f207075742074686520776f726c642075707369646520646f776e2c20616e6420796f7520647265616d732061726520636f64656420696e204a41564120616e64206261736564206f6e206d6f6e676f44422c2073686f757420697420686572653a206861636b657273406d6173686170652e636f6d20496620796f75277265206b69636b2d61737320646576656c6f706572207765276c6c2066696e6420796f752e204265206172726f67616e742e'; | |
var decode = function(txt) { | |
var decoded = ''; | |
for (var i = 0; i < txt.length; i += 2) { | |
var b = '' + txt.charAt(i) + txt.charAt(i+1); | |
var c = parseInt(b, 16); | |
decoded += String.fromCharCode(c); | |
} | |
return decoded; | |
}; | |
console.log(decode(text)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment