Skip to content

Instantly share code, notes, and snippets.

View vinitkumar's full-sized avatar
🪀
Focusing

Vinit Kumar vinitkumar

🪀
Focusing
View GitHub Profile
#include<iostream>
#include<cstdlib>
#include<stdio.h>
using namespace std;
struct node /* declaration of a node*/
@vinitkumar
vinitkumar / script.sh
Created May 10, 2012 19:15
OS Name in Ubuntu
#! /bin/bash
uname -a | awk '{print $4}'| sed -e s/#37-//g
~
~
@vinitkumar
vinitkumar / arrange.sh
Created May 19, 2012 06:02
Its is a script to arrange a directory and copy the files to respective directories for easy access
#! /bin/bash
echo "Enter the name of Directory to arrange"
echo
read dir
mkdir $HOME/compressed
@vinitkumar
vinitkumar / crawler.py
Created June 29, 2012 19:01
This crawler starts with a target url, fetches the web-page of that url and parser all the links of that page and stores it in a repo. Next it uses the url from the repo and repears the same process.This process goes on till a respective number of links a
#! /usr/bin/env python
import sys,re,time,math,urllib2,optparse,urlparse
from BeautifulSoup import BeautifulSoup
from traceback import format_exc
from cgi import escape
from Queue import Queue, Empty as QueueEmpty
__author__="Vinit Kumar"
__version__ = "0.1"
@vinitkumar
vinitkumar / mysql commands
Created August 5, 2012 15:27
Insert a file into a MySQL db
~ mysql --local-infile -u username -p database
mysql > load data local infile '/home/vicky/a.txt' into table tablename;
To see the Data Stored:
mysql> select * from Writers;
@vinitkumar
vinitkumar / .bashrc
Created August 5, 2012 15:30
My Zsh Config
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# don't overwrite GNU Midnight Commander's setting of `ignorespace'.
export HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups
webapi-vim: Vim Interface to Web API
Description:
Interface to WEB APIs.
Currently this library support following protocols.
* Basic HTTP
* OAuth
* Atompub
* SOAP (in progress)

===== Title

I just got a mail from github, stating that they are preferring candidates with better communication skills. Why because i have done the most idiotic and careless mistake, I wrote in one place, GetGlue(another company) in place of GitHub. This is easily one of the most amazing fuck ups i have done with myself, GitHub is one of the most amazing place to work with, and i spoiled it.Because i was too careless and didn't proofread.

Simple shell script to break ceaser cypher:
Say we have a alphanumeric cyphered using Rot13 :
Eg:
5Gr8L4qetPEsPk8htqjhRK8XSP6x2RHh
In order to break this, all we need is a simple tr construct

============================== title: How did i pulled it off

The task sound pretty simple, to find a unknown password that occurs only once in 1100 line password dump.Also each of these passwords are 30 letters long.

Here is how i went with this problems.

Here is the password dump (dump)[http://paste.ubuntu.com/115909/] First i sorted the dump and then got the uniq password and stored them in another text file.