Skip to content

Instantly share code, notes, and snippets.

captn3m0 /
Created Feb 27, 2014
Blog post of new updates in Muzi. Publishing here since is down.

Muzi has consistently been our most popular application, and we've worked on it continously over time to make it even better. Today, we announce a slew of new features that we've brought to muzi. We hope these features will help you use Muzi more extensively. As always, we are [open to feedback][feedback] regarding these new features or any bugs you may face.


For those of you who have created lots of playlists on Muzi, we bring you [Nano][nano], a specially crafted light version of Muzi. It was designed from the ground up to be lightweight, minimal, and above all easily usable. It does not boast of all the features that Muzi has, but it more than makes up for it with its beautiful interface. Just hit (you must be logged in), choose a playlist, and you're all set. Repeat is enabled by default in Nano, and you can turn on shuffle at will. The share link is available directly in Nano for you to use as well. The controls (including keyboard shortcuts) for Nano are same as th

captn3m0 / jsbin.qitowijo.css
Created Mar 7, 2014
A basic mockup of our new status page.
View jsbin.qitowijo.css
position: fixed;
top: 50%;
left: 50%;
margin-top: -50px;
margin-left: -100px;
font-family: 'Simonetta', cursive;

Keybase proof

I hereby claim:

  • I am captn3m0 on github.
  • I am captn3m0 ( on keybase.
  • I have a public key whose fingerprint is CD8A 6149 3FF2 A8AC 9B16 4551 D7BB DF1B B896 3685

To claim this, I am signing this object:

captn3m0 /
Created Aug 11, 2014
ENML Scrubber in ruby using Loofah

The problem is converting a valid html document to a valid ENML (Evernote Markup Language) schema. Validation is performed, but performing validation over and over is not a good solution. The idea is to transform the doc by scrubbing out invalid tags and attributes, which come under the following categories:

  1. allowed_tags : These are the only valid tags in ENML, and have a set of valid attributes for each
  2. disallowed_tags: Remove these tags completely from the doc

If a tag other than these is found, strip it (replace it with its children). To "know which tags to remove and which to keep", I have a dtd file (enml2.dtd) and want to parse it.

captn3m0 /
Last active Aug 29, 2015
Simple script to check if visitor is from IITR (Ruby)

Sample ruby code to check if the request IP is from a location in IIT-Roorkee.

  • Remember to install the netaddr gem.
  • IP ranges used from
  • If you are using cloudflare, install mod_cloudflare for apache
captn3m0 /
Created Oct 6, 2014

According to my tests, I take a 18.89% performance hit because of using ecryptfs. I understand this is not much, but just wanted to test and document it anyway.

Hard Disk Model: Western Digital, WDC WD5000LPVX-2, 500GB (465GiB)

##With ecryptfs

$ time dd if=/dev/zero of=filename bs=1024 count=1000000

1000000+0 records in
1000000+0 records out
captn3m0 / response.txt
Last active Aug 29, 2015
Yureka Deal Status
View response.txt
HTTP/1.1 200 OK
Date: Tue, 13 Jan 2015 10:21:18 GMT
Server: Server
x-amzn-RequestId: ea145a86-9b0d-11e4-a894-931a3cd42caf
X-Amz-Date: Tue, 13 Jan 2015 10:21:19 GMT
Content-Type: application/json
Content-Length: 2852
Vary: Accept-Encoding,User-Agent
captn3m0 /
Last active Aug 29, 2015
HackIM 2015 Web 500 Write-up Source Code


Final output of the tool

Attempt number 50
Code is yGrkeP
           Score :50 
Attempt number 51
Code is tcrYlt
           Score :51Flag is H@CKIM_C@pTcha!09022015 
captn3m0 /
Created Feb 13, 2015
Hacker News Apps People Listings

Decided to jazz up the HN Apps Wiki with some people love.

  1. Extracted names from the markdown using simple grep
  2. Ran all names against GitHub search
  3. Manually copied back github profiles to the wiki

The copy back was manual so as to reduce errors.