Skip to content

Instantly share code, notes, and snippets.

View arulrajnet's full-sized avatar

Arul arulrajnet

View GitHub Profile
@arulrajnet
arulrajnet / SimpleHTTPServerWithUpload.py
Last active August 2, 2019 05:27 — forked from UniIsland/SimpleHTTPServerWithUpload.py
Simple Python Http Server with Upload
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""
@arulrajnet
arulrajnet / colors.py
Last active January 2, 2023 04:45 — forked from jossef/colors.py
python coloring for linux, based on this answer http://stackoverflow.com/a/26445590/3191896 and modified to make it more usable in a pythonic way.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
class Color(object):
"""
reference from https://gist.github.com/Jossef/0ee20314577925b4027f and modified bit.
"""
def __init__(self, text, **user_styles):
@arulrajnet
arulrajnet / download_java.py
Last active June 18, 2019 19:23 — forked from LordH3lmchen/download_latest_java.py
Download Oracle Java JDK / JRE from the terminal in an interactive manner. Useful when you want to download java in non-gui environment.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from urllib.request import Request, urlopen
except ImportError: # python 2
from urllib2 import Request, urlopen
import re
import os