I hereby claim:
- I am ppsreejith on github.
- I am ppsreejith (https://keybase.io/ppsreejith) on keybase.
- I have a public key whose fingerprint is 4CC9 7B47 29F5 EABE 0C6B 73AC A8F0 1505 C9DD 49BA
To claim this, I am signing this object:
| import smtpd | |
| import smtplib | |
| import asyncore | |
| class SMTPServer(smtpd.SMTPServer): | |
| def __init__(*args, **kwargs): | |
| print "Running smtp server on port 25" |
| #!/bin/sh | |
| PROXY_IP=144.16.192.247 | |
| PROXY_PORT=8080 | |
| LAN_IP=`nvram get lan_ipaddr` | |
| LAN_NET=$LAN_IP/`nvram get lan_netmask` | |
| iptables -t nat -A PREROUTING -i br0 -s $LAN_NET -d ! $LAN_IP -p tcp --dport 80 -j DNAT --to $PROXY_IP:$PROXY_PORT | |
| iptables -t nat -A PREROUTING -i br0 -s $LAN_NET -d ! $LAN_IP -p tcp --dport 443 -j DNAT --to $PROXY_IP:$PROXY_PORT | |
| iptables -t nat -A POSTROUTING -o br0 -s $PROXY_IP -p tcp -d $LAN_NET -j SNAT --to $PROXY_IP | |
| iptables -A FORWARD -i vlan1 -o br0 -s $LAN_NET -d $PROXY_IP -p tcp --dport $PROXY_PORT -j ACCEPT |
| ## Inside the firewall ( use proxy) | |
| Host * | |
| #ProxyCommand /usr/bin/corkscrew 192.168.1.102 8080 %h %p | |
| #ProxyCommand putty -load phoneproxy %h %p | |
| #ProxyCommand nc -X connect -x 192.168.1.102:8080 %h %p | |
| CheckHostIP no | |
| Compression yes | |
| Protocol 2 | |
| ProxyCommand connect -4 -S 192.168.1.150:9050 $(tor-resolve %h 192.168.1.150:9050) %p |
| import googlemaps | |
| import csv | |
| gmaps = googlemaps.Client('YOUR_API_KEY_HERE') | |
| with open('NAME_OF_FILE.csv') as info: | |
| read = csv.reader(info) | |
| ans = [] | |
| for row in read: | |
| ans.append(row[0] + ", Hong Kong") |
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/python | |
| from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer | |
| PORT_NUMBER = 8080 | |
| class myHandler(BaseHTTPRequestHandler): | |
| def do_GET(self): | |
| self.send_response(200) | |
| self.send_header('Content-type','text/html') | |
| self.end_headers() |
| worker_processes auto; | |
| pid /run/nginx.pid; | |
| daemon off; | |
| events { | |
| worker_connections 1024; | |
| } | |
| http { | |
| sendfile on; |
| import Immutable from 'immutable'; | |
| import _ from 'lodash'; | |
| const initialState = Immutable.Map({ | |
| data: 5 | |
| }) | |
| const reducers = { | |
| FILTER_EDIT: (state, {data}) => state.merge({data}), | |
| FILTER_INC: (state) => state.updateIn(['data'], val => val+1), |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
| add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
| apt-get -y update | |
| apt-get -y upgrade | |
| apt-get -y install zsh emacs silversearcher-ag docker-ce htop nginx jq | |
| if [ ! -f /usr/local/bin/docker-compose ]; then | |
| echo "Installing docker compose" | |
| VERSION=$(curl --silent https://api.github.com/repos/docker/compose/releases/latest | jq .name -r) | |
| curl -L https://github.com/docker/compose/releases/download/${VERSION}/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose | |
| chmod +x /usr/local/bin/docker-compose |
| #Everything is monthly | |
| G_INITIAL_AMOUNT = 0.0 | |
| G_INVESTMENT = 1200.0 | |
| G_INTEREST_RATE = 1.07 ** (1.0/12.0) | |
| G_INFLATION_RATE = 1.0228 ** (1.0/12.0) | |
| G_CURRENT_SPENDING = 1000.0 | |
| def compound(principal, investment, rate, time): | |
| "Compound interest calculator" |