Skip to content

Instantly share code, notes, and snippets.

View Praseetha-KR's full-sized avatar
📚

Praseetha KR Praseetha-KR

📚
View GitHub Profile
IP
TCP
HTTP
brower -> www.google.com
-> DNS search for google.com return ip xxx.xxx.xxx.xxx
-> connect to xxx.xxx.xxx.xxx
-> GET / HTTP/1.0
-> index.html with status code 200 ok
a = {}
def hot_cold(n, m):
if (n > m):
n, m = m, n
if a.has_key((n,m)):
return a[(n,m)]
else:
if ((n, m) == (0, 0)):
return False
@Praseetha-KR
Praseetha-KR / keybase.md
Last active February 10, 2017 15:20
keybase.md

Keybase proof

I hereby claim:

  • I am Praseetha-KR on github.
  • I am praseetha (https://keybase.io/praseetha) on keybase.
  • I have a public key whose fingerprint is C5BB 5C27 D82E CBA5 9E58 43B4 E960 5A1B B95D 33E4

To claim this, I am signing this object:

@Praseetha-KR
Praseetha-KR / xlstojson.py
Last active September 21, 2015 12:51 — forked from cosmosgenius/xlstojson.py
script to convert a expense excel sheet to json data
import xlrd
import json
import sys
import argparse
def convert(workbook):
wb = xlrd.open_workbook(workbook)
year = 2013
data = []
'use strict';
let XLSX = require('xlsx');
let workbook = XLSX.readFile(process.argv[3]);
let sheets = workbook.Workbook.Sheets.map(obj => obj.name);
let mails = sheets.reduce((acc, elem) => {
let sheet = workbook.Sheets[elem];
let mailArr = Object.keys(sheet).map(cell => sheet[cell].v).filter(val => val).filter((val, index) => index);
@Praseetha-KR
Praseetha-KR / 0_UI_Standardization.md
Last active June 22, 2017 09:27
UI standardisation: CSS Frameworks, Pattern Libraries & Architectures
@Praseetha-KR
Praseetha-KR / ovpn-deployment.yaml
Last active March 13, 2018 18:45
OpenVPN k8s files
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: openvpn
labels:
app: openvpn
spec:
replicas: 1
strategy:
type: Recreate
@Praseetha-KR
Praseetha-KR / user-data.yml
Last active October 23, 2023 20:37
Squid proxy cloud-init config
#cloud-config
package_update: true
packages:
- squid
- apache2-utils
write_files:
- path: /etc/squid/squid.conf
content: |
auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/htpasswd
auth_param basic realm proxy