Skip to content

Instantly share code, notes, and snippets.

View puneetsl's full-sized avatar
🏠
Working from home

Puneet Singh Ludu puneetsl

🏠
Working from home
View GitHub Profile
@puneetsl
puneetsl / .vimrc
Created October 7, 2016 06:17
Awesome vimrc for python
set runtimepath+=~/.vim_runtime
set nocompatible " be iMproved, required
filetype off " required
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'Xuyuanp/nerdtree-git-plugin'
@puneetsl
puneetsl / System Design.md
Created April 26, 2016 04:38 — forked from vasanthk/System Design.md
System Design Cheatsheet

#System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

##Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@puneetsl
puneetsl / Quark.c
Created May 22, 2015 14:51
Code works in Turbo C 3, 16 bit C compiler. This code sends and receives files over a common network drive
// Copy.cpp : Defines the entry point for the console application.//#include "stdafx.h"
#include "conio.h"
#include "stdio.h"
#include "dos.h"
#include "stat.h"
#include "fcntl.h"
char buffer[21480];
int send(char *,char *,long);
int reciever(char *,char *,long int,long);
@puneetsl
puneetsl / autoWallpaperChanger.pl
Created November 17, 2014 00:15
Automatically change wallpaper in Lubuntu from an input folder
#!/usr/bin/perl
my $arg= "$ARGV[0]\n";
sub rtrim($)
{
my $string = shift;
$string =~ s/\s+$//;
return $string;
}
while(1){
my $dir = rtrim($arg);
@puneetsl
puneetsl / .bash_profile
Last active August 29, 2015 14:07
My Bash Profile for Mac (Keywords: OSX, Terminal, Bashrc, Bash, MacOS, Apple)
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@puneetsl
puneetsl / ObfuscatedResume.c
Last active August 29, 2015 14:07
My Obfuscated Code for printing my resume
#include <stdio.h>
#include <string.h>
#define XXqwqPN printf("\n")
#define XXqwqPC printf("%c",c)
main(){int i=0;char XXqwqbuff[]="Rvoggv!Ukphi\"Mwfv!?rvoggv/ukphiBmkxf/eqo\"}\"87\"Nfstjnbd!Uvsggv-\"Cwhgcnp-\"O[\"25425\"}\",2.)938*!464.2976!??Gfvdbukqp;?Ocuvfs\"pg\"Tdjfoeg\"jo\"Dpnqwvfs\"Tdjfoeg.!Uvbug\"Vokxfsukvz!qh!Pfx![qtl-\"Cwhgcnp-\"HQC<!5057.!gzqgevfe\"!4136>C0!Vfdi0!kp!Eqorvugt!Uekgpdf-\"!Lbzqgg\"Jouvjuwvf!qh!kpgqtnbukqp!Vfdippmqi{.!Rfsegpucig<!88&-\"Oqkfb-\"3221??RSQITBNNJOI?,!Cfwcpdfe\"loqynfeig\"pg\"Kcxb-\"D-\"Qgtm.!JUON>+\"Hppe\"loqynfeig\"pg\"D,,-\"D$-\"Q{viqp-\"QkiNbukp>+\"Ccukeu\"pg\"QJQ.!lRvfs{.!LbwcUetjqv-\"DTT-\"Nbunbc??UMKNMU?,!Cfwcpdfe\"bmiqtjujnt!cpe\"ecvb!uvswevvsgu?,!Qrfscvjoi\"tztugou\")Oce\"PT-\"Mkpvy+?,!Fjtutjcwvfe\"dpnqwvjoi\")Crbdig\"Icfppq.!Crbdig\"Qki+??Wpjwgttju{\"qtpkgevt;?,!Kpggtskph!igpegt!qh!c\"Uykvugt!wugt!wukph!egnfctjukgu\"ju\"gqnmqyu\")Lbwc.!Rfsn-\"Hpphmg\"BQK.!Crbdig\"Qki+?,!Swgpb.!Cp!cwvpnbuke\"rvftukqp!cptxfskph!u{uvfn!*Kcxb-\"Bqcejf!Uqns.!Uvbohpsf!PFS.!Uvbohpsf!RPT!
@puneetsl
puneetsl / conpsl.h
Last active August 29, 2015 14:06
Conio.h for gcc (Used here: https://github.com/puneetsl/shellSudoku)
//this header file is made by puneet singh {www.puneetsingh.me}
#include <termios.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#if !defined(__COLORS)
#define __COLORS
enum COLORS {
BLACK, //0 /* dark colors */
@puneetsl
puneetsl / NextCertainPrime.java
Created August 24, 2014 05:54
Simple Next Certain Prime number
import java.util.ArrayList;
public class NextCertainPrime {
public static Long primeNow = 2l;
private static int n = 1;
private static ArrayList<Long> primes = new ArrayList<Long>();
public static void nextPSLPrime() {
int top1000[] = { 2, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41,
#!/usr/bin/env python
# encoding: utf-8
import tweepy #https://github.com/tweepy/tweepy
import csv
#Twitter API credentials
consumer_key = ""
consumer_secret = ""
access_key = ""
use LWP::Simple;
use HTML::Restrict;
use HTML::Entities;
$/ = '';
$userID = "<twitter user id>";
printInfoJSON("$userID");
sub printInfoJSON{
$uid=$_[0];
$screen_name = getScreenName($uid);
$profile_html = getProfile($screen_name);