Skip to content

Instantly share code, notes, and snippets.

View kartikv11's full-sized avatar
🎯
Ducks Quack, Eagles Soar

Kartik Verma kartikv11

🎯
Ducks Quack, Eagles Soar
View GitHub Profile
@kartikv11
kartikv11 / introrx.md
Created March 28, 2016 09:24 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@kartikv11
kartikv11 / happy_git.md
Created April 28, 2017 09:24
Happy Git env on OSX

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Kartik Verma"

git config --global user.email "kartx111@gmail.com"

Keybase proof

I hereby claim:

  • I am kattybilly on github.
  • I am kattybilly (https://keybase.io/kattybilly) on keybase.
  • I have a public key ASBx7PPW6iMqHEMCWjj-9ZYCkVGXGVceyqLxaGtpKHlnego

To claim this, I am signing this object:

@kartikv11
kartikv11 / HTTPURLConnection.java
Created June 9, 2017 10:06
Send HTTP POST/GET request using HttpURLConnection in java
package com.hprog99;
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import javax.net.ssl.HttpsURLConnection;
@kartikv11
kartikv11 / scrape_it.py
Last active July 5, 2017 13:51
Example of parsing/scraping data using BeautifulSoup. Source used here: http://www.labour.delhigovt.nic.in/
import requests
from bs4 import BeautifulSoup
import sys
import csv
sys.setrecursionlimit(5000)
# We've now imported the two packages that will do the heavy lifting
# for us, reqeusts and BeautifulSoup
# Let's put the URL of the page we want to scrape in a variable
@kartikv11
kartikv11 / doctors_scraping.py
Last active August 11, 2017 10:25
Example of parsing/scraping data[with Proxy] for All Doctors using BeautifulSoup. Source used here: https://old.mciindia.org [NOTE: Please control Threads as per your Proxy Restrictions]
import requests
from bs4 import BeautifulSoup
import sys
import json
import threading
import re
import time
import os
proxies = {
@kartikv11
kartikv11 / useHexo.md
Created August 29, 2017 10:36 — forked from btfak/useHexo.md
How to use Hexo and deploy to GitHub Pages
@kartikv11
kartikv11 / structure.md
Last active October 10, 2017 11:19
Django App structure (with Settings Module)
myapp/
├── manage.py
└── myapp
  ├── __init__.py
  ├── settings
  │ ├── __init__.py
  │ ├── base.py
  │ ├── dev.py
 │ ├── feature.py
@kartikv11
kartikv11 / gcp_signed_url_util.py
Created October 20, 2017 08:51
Python3 Utility to create Signed URLs for Google Cloud Storage File Upload (with expiry)
"""
Code to create a signed URL to upload a file using that signed URL to Google Cloud Storage
Constants to be present in settings module or can be defined locally:
- GCP_CRED_FILE_PATH (JSON file where the GCP credentials are present)
- GCP_PROJECT (GCP Project name)
- GCP_STORAGE_BASE_URL (Base Url of GCP, usually https://storage.googleapis.com)
- GCP_SIGNED_URL_TIMEOUT (Timeout in seconds for which the signed URL is valid)
- GCP_BUCKET (Google Cloud Bucket Name)
"""
import logging
@kartikv11
kartikv11 / tmux-cheatsheet.markdown
Created November 14, 2017 10:26 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname