Skip to content

Instantly share code, notes, and snippets.

@captn3m0
captn3m0 / index.md
Created August 29, 2012 19:49
Stripe Level 8 Solution

The basic solver I made for the level8. I had to manually edit the file after each chunk, but I was too lazy to implement the chunk loop. Thanks to Bubba on IRC for recommending me to use httplib2 instead of httplib, it took down the jitter by quite a lot.

Python is not my first language, and I would never again use it for such a thing (unless I learn it better). I was trying with ruby, but didn't get the patterns then. I had a semi-working script in python before I learnt better.

The source is here if you are browsing this on gist.io

##Logic I didn't get the increment-by-chunk-number thing, and I was using an average of the port difference between last two requests. The average was 2 for most of my requests. For all the positives, the difference was above the average, which I used. I only ran this once for capturing the flag, when it took me about 5-8 minutes to capture the flag. This was on the last day of the ctf with about 15 hours remaining.

While run

@captn3m0
captn3m0 / backup.md
Created September 2, 2012 22:23
My Backup Plan

This is the backup plan I'm using for my newly-won 1 TB HDD (Thanks Yahoo!).

Partitions

On the Internal HDD (320GB)

  • 50GB / (primary OS) (ext4)
  • 220 GB /home (ext4)
@captn3m0
captn3m0 / dominos.sh
Created September 16, 2012 17:40
Dominos Slot Machine Player
#!/bin/bash
#Play a single round on http://pizzaonline.dominos.co.in/slot-machine/ to get your session_id
until php test_result.php; do
curl -s -H "X-Requested-With:XMLHttpRequest" -X POST -d "session_id=$1" http://pizzaonline.dominos.co.in/slot-machine/process-slot.php -o result.json
done;
@captn3m0
captn3m0 / stylish.css
Created October 8, 2012 07:59
Fix Outlook.com fonts in linux
*{
font-family: "Seogue UI","Ubuntu","Droid Sans","Helvetica" !important;
}
.Snippet, .ExternalClass{
font-family: "Seogue UI","Ubuntu","Droid Sans","Helvetica" !important;
}
/** outlook.com uses calibri, which might be missing, and even if present, faces lots of rendering problems
* This fixes it by replacing it with Segoe UI & the rest of stack
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html lang="en" class="no-js no-userlogin"> <!--<![endif]-->
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
@captn3m0
captn3m0 / youtube.luac
Created December 7, 2012 08:03
Nightly youtube.luac for VLC Player
--[[
$Id$
Copyright © 2007-2012 the VideoLAN team
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
@captn3m0
captn3m0 / README.md
Last active October 28, 2015 11:09
Bug Bounty for Homeopathy

Introduction

This is a public document offering a monetary bounty to writers who are willing to write a piece on Homeopathy in India. The bounty money is yours to keep. If you do not wish to keep it, I'll donate it to a charity of your choice.

Why

Welcome Cure is an Indian homeopathy startup that raised $6 million recently. I don't think that investors in India should be trusting their money with something that doesn't work and plays with the public's health. Consider this bounty as an incentive to do something about it.

@captn3m0
captn3m0 / clipx-homepage.md
Created August 6, 2014 16:12
Home Page copy

I want the home page copy to be of a similar style to that of Papa Parse. Basically, there will be a primary hook followed by a QA-style explanation of what ClipX is. This document will hold those QA and other home-page copy till we are ready to commit it to the repository.

What is ClipX?

Its a content syndication service

That was not at all clear.

ClipX archives and stores everything you want to save on the internet. If you've used ifttt, think of it as ifttt for content.

So you store everything I visit? >No. We store whatever you want to. For eg, you may add an article to pocket, or tag it on Feedly, post a link on your facebook wall, or even star it on twitter. ClipX recognizes all these actions and saves the corresponding link into our database.

@captn3m0
captn3m0 / 00-port-list.txt
Last active December 16, 2015 14:39
List of outgoing ports opened in the IIT-R campus
21
22
53
80
81
110
161
162
210
443
@captn3m0
captn3m0 / jquery.jsonCache.js
Created September 1, 2013 10:02
JQuery JSON fetch function with cache support ($.getJSONCache)
/**
* Uses localStorage for cache and if misses
* uses getJSON to get content
*/
$.getJSONCache=function(url,data,success){
data = data || {}
var key = url + '?' + $.param(data);
var value = localStorage.getItem(key);
if(value)
{