Skip to content

Instantly share code, notes, and snippets.

View R3DDY97's full-sized avatar

R3DDY97

View GitHub Profile
@R3DDY97
R3DDY97 / hosts
Created August 31, 2020 13:56
adblock hosts
This file has been truncated, but you can view the full file.
# May break iOS Game Center.
# URLs to their site.
# problems with NPR.org
# and potentially other sites.
# video on sites such as cbc.ca
# and some distribute adware and spyware
# message board spam and are unlikely to be real sites
# up CSS on livejournal
# log all such errors.
@R3DDY97
R3DDY97 / google_ips.txt
Created April 18, 2020 19:03
Google IP list
8.8.8.8
8.8.4.4
74.125.0.0/16 # gmail smtp
35.190.247.0/24
35.191.0.0/16
64.233.160.0/19
66.102.0.0/20
66.249.80.0/20
72.14.192.0/18
74.125.0.0/16
@R3DDY97
R3DDY97 / Facebook ip list
Last active April 11, 2020 02:25
Facebook ip list => (whois -h whois.radb.net -- '-i origin AS32934' | awk '/^route:/ {print $2;}' | sort | uniq)
102.132.100.0/24
102.132.101.0/24
102.132.102.0/24
102.132.103.0/24
102.132.104.0/24
102.132.105.0/24
102.132.106.0/24
102.132.107.0/24
102.132.108.0/24
102.132.109.0/24
@R3DDY97
R3DDY97 / send_mail.py
Created August 15, 2019 16:03 — forked from vjo/send_mail.py
[Python] Send email with embedded image and application attachment
#! /usr/bin/python
import smtplib
from optparse import OptionParser
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.image import MIMEImage
from email.mime.application import MIMEApplication
@R3DDY97
R3DDY97 / openpgp.txt
Created January 11, 2019 20:22
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:1581b492f2bc39f44f4103d25327367cefafde62]
@R3DDY97
R3DDY97 / state_list.json
Created May 26, 2018 04:55
States list of India and its Codes
{"India":{"StateList":[{"SCode":"AN","SName":"Andaman and Nicobar"},
{"SCode":"AP","SName":"Andhra Pradesh"},
{"SCode":"AR","SName":"Arunachal Pradesh"},
{"SCode":"AS","SName":"Assam"},
{"SCode":"BR","SName":"Bihar"},
{"SCode":"CG","SName":"Chhattisgarh"},
{"SCode":"CH","SName":"Chandigarh"},
{"SCode":"DD","SName":"Daman and Diu"},
{"SCode":"DL","SName":"Delhi"},
{"SCode":"DN","SName":"Dadra and Nagar Haveli"},
@R3DDY97
R3DDY97 / haversian_distance.py
Last active April 29, 2018 09:19
Calculates distance between two points on earth using their latitudes and longitudes
#!/usr/bin/env python3
'''Calculates Haversian distance between two points on earth'''
from math import (sqrt, radians, sin, cos, atan2)
def haversian_dist(loc1, loc2):
'''Calculates Haversian distance between two points on earth
loc1 and loc2 are (lat, long) of two points'''
radius = 6373.0 # approx earth radius in km

Keybase proof

I hereby claim:

  • I am R3DDY97 on github.
  • I am r3ddy97 (https://keybase.io/r3ddy97) on keybase.
  • I have a public key whose fingerprint is 1581 B492 F2BC 39F4 4F41 03D2 5327 367C EFAF DE62

To claim this, I am signing this object:

@R3DDY97
R3DDY97 / install_nextcloud.sh
Created January 5, 2018 06:54
Installs Nextcloud in Raspberrypi 3
#!/bin/bash
echo "Updating system packages "
echo
sudo apt update && sudo apt upgrade -y; sudo apt full-upgrade -y; sudo apt autoremove -y ;
sudo apt install apache2 sqlite php7.0 php7.0-gd sqlite php7.0-sqlite3 php7.0-curl php7.0-zip php7.0-xml php7.0-mbstring -y;
sudo service apache2 restart
@R3DDY97
R3DDY97 / pdf-dl.py
Last active December 4, 2017 09:16
Downloads all pdfs from webpage
#!/usr/bin/env python3
def Usage():
print(
"""
Usage:-
Downloads all the pdf links from a given webpage
python pdf-dl.py url <path/to/directory>