This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:3.3 | |
# referred from https://hub.docker.com/r/sebp/lighttpd/ | |
MAINTAINER Arul <[email protected]> | |
RUN apk add --update lighttpd \ | |
&& rm -rf /var/cache/apk/* \ | |
&& sed -i.bak "s/server.document-root/#server.document-root/g" /etc/lighttpd/lighttpd.conf \ | |
&& echo server.document-root = var.basedir >> /etc/lighttpd/lighttpd.conf \ | |
&& echo server.port = 8080 >> /etc/lighttpd/lighttpd.conf \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from collections import namedtuple | |
from datetime import timedelta | |
import json | |
import datetime | |
import re | |
import sys | |
import getopt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from TorCtl import TorCtl | |
import urllib2 | |
user_agent = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7' | |
headers={'User-Agent':user_agent} | |
def request(url): | |
def _set_urlproxy(): | |
proxy_support = urllib2.ProxyHandler({"http" : "127.0.0.1:8118"}) | |
opener = urllib2.build_opener(proxy_support) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from collections import namedtuple | |
import json | |
try: | |
from urllib.request import Request, urlopen | |
except ImportError: # python 2 | |
from urllib2 import Request, urlopen |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
# Shell script to get a Live cricket score from www.espncricinfo.com | |
# To help Cricket fan DevOPS see the score on his Terminal. | |
# Thanks to ESPN SPORTS MEDIA LTD for their RSS feed. | |
# | |
# Author : Arul <mailto:[email protected]> | |
function get_html() { | |
local html=$(curl -k -L -s $1) | |
echo "$html" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import tweepy # https://github.com/tweepy/tweepy | |
import json | |
import csv | |
import sys | |
# Twitter API credentials | |
consumer_key = "your_consumer_key" | |
consumer_secret = "your_consumer_secret" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Verify the given mail id is valid or not without sending mail. Verifying the email id directly from mail exchange server. | |
""" | |
import argparse | |
import smtplib | |
import dns.resolver |