Skip to content

Instantly share code, notes, and snippets.

View vikraman's full-sized avatar

Vikraman Choudhury vikraman

View GitHub Profile
#!/usr/bin/env perl
use warnings;
use strict;
use Data::Dumper;
use WWW::Mechanize;
use Compress::Zlib;
my $mech = WWW::Mechanize->new();
my $username = "9038090380";
@vikraman
vikraman / pty_login.c
Created February 20, 2012 19:05
Shell on a pty
#include <stdio.h>
#include <stdlib.h>
#include <pty.h>
#include <unistd.h>
#include <fcntl.h>
#include <termios.h>
#include <sys/select.h>
#define BUF_SIZE 80
@vikraman
vikraman / GateResult.py
Created April 2, 2012 12:26
Gate results grabber
#!/usr/bin/env python
import urllib
from multiprocessing import Pool
def fetch_result(regno):
try:
data = urllib.urlencode({'curyear':'2012', 'rndno':'2988624', 'curregno':regno, 'prevyear':'2011', 'prevregno':'', 'qdeg':'E2', 'qdisc':'ECS', 'mcat':'GN', 'mpd':'N'})
result = urllib.urlopen("http://mtechadm.iitm.ac.in/gform2.php", data)
s = result.read()
@vikraman
vikraman / jucse-stats.py
Created June 13, 2012 12:06
Jucse results grabber
#!/usr/bin/env python
import json
import pprint
d = json.JSONDecoder().decode(raw_input())
l = sorted(d, key=lambda x: d.get(x)['cgpa'], reverse=True)
for idx,rollno in enumerate(l:(
@vikraman
vikraman / DateTimeSerializer.scala
Created February 11, 2013 19:05
org.joda.time.DateTime serializer for titan
package com.example
import java.nio.ByteBuffer
import org.joda.time.DateTime
import com.thinkaurelius.titan.core.AttributeSerializer
class DateTimeSerializer extends AttributeSerializer[DateTime] {
private val serialVersionUID = 272513079663L
@vikraman
vikraman / Greet.glade
Created April 9, 2013 14:59
reactive-banana-gtk example
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="2.24"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkWindow" id="mainWindow">
<property name="can_focus">False</property>
<property name="title" translatable="yes">Greeter</property>
<child>
<object class="GtkVBox" id="vbox">
<property name="visible">True</property>
@vikraman
vikraman / .config
Last active December 16, 2015 01:58
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 3.7.5-hardened-r1 Kernel Configuration
#
# CONFIG_64BIT is not set
CONFIG_X86_32=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf32-i386"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/i386_defconfig"
import smoke._
import akka.actor._
import akka.routing.RoundRobinRouter
import akka.pattern.ask
import akka.util.Timeout
import scala.concurrent.duration._
import scala.concurrent.Await
object NotFoundException extends Exception("Not found")
@vikraman
vikraman / dart-init.el
Last active August 29, 2015 14:12
dartformat hook for emacs
;;; dart-init.el -- dart
;;; Commentary:
;;; Code:
(require 'auto-complete)
(require 'cl)
(defun dart--goto-line (line)
(goto-char (point-min))

Keybase proof

I hereby claim:

  • I am vikraman on github.
  • I am vikraman (https://keybase.io/vikraman) on keybase.
  • I have a public key whose fingerprint is CE52 ABDA 543E 4957 B049 8307 47DD 5484 B0A7 2FD2

To claim this, I am signing this object: