Skip to content

Instantly share code, notes, and snippets.

View ruehowl's full-sized avatar
🏡

Rahul Varghese ruehowl

🏡
  • Qlik.com
  • India
View GitHub Profile
@ruehowl
ruehowl / bash-cheatsheet.sh
Created October 13, 2016 06:18 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@ruehowl
ruehowl / apache_nginx_php_proftpd.sh
Last active October 19, 2016 04:11
This script can be used to compile and install apache2.4.23, nginx, php7.0.11 and proftpd
#!/bin/bash
# This script can be used to compile and install apache2.4.23, nginx, php7.0.11 and proftpd
export PROJ_DIR=`pwd`
export ARCHIVE_DIR="$PROJ_DIR/archive"
export SOURCE_DIR="$PROJ_DIR/src"
export PREFIX=$1
echo "Creating Archive and src....."
mkdir -p "$PROJ_DIR" "$ARCHIVE_DIR" "$SOURCE_DIR"
echo "Done.."
@ruehowl
ruehowl / cashssh.sh
Created November 13, 2016 01:08
cash_ssh_and_manage_your_servers
#!/bin/bash
option=$1
function new_server {
server_name=$1
user=$2
ip=$3
port=$4
user_pass=$5
root_pass=$6
@ruehowl
ruehowl / install_pptpd_server.sh
Last active November 12, 2017 07:15
Install pptpd server on centos7
#install PPTPD server on centos7
#Auther: Rahul Varghese
# install the latest epel repo
# http://download.fedoraproject.org/pub/epel/beta/7/x86_64/
echo "Installing ppp and pptpd"
yum -y install ppp pptpd
@ruehowl
ruehowl / curl.md
Created July 19, 2018 15:14 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@ruehowl
ruehowl / prometheus.yml
Created December 14, 2018 10:36 — forked from reachlin/prometheus.yml
sample prometheus configuration explained
// For all the confusing Prometheus configuration and
// regular expressions,
// explained in examples.
// Remember, there are default values for each item if it's missing.
// regex is (.*),
// replacement is $1,
// separator is ;
// ,and action is replace
@ruehowl
ruehowl / cachessh.sh
Last active December 27, 2018 18:39
Cache server info each time you ssh.
#!/bin/bash
#provide an option.
# -a add a server <server name> <user> <ip> <port> <'user pass'> <'root pass'>
# -l list cached servers.
# -r remove an entry.
# -s ssh to a server <server name or server ip>
option=$1
function new_server {
# fabfile Beta V0.7
# Maintained by rahul.va@endurance.com
from fabric import Connection
from invoke import task
import dns.resolver
import ipaddress
import sys
#Tsak Wbox will whether the domain is a webhostbox.net server and retrave the user name.
@ruehowl
ruehowl / kafka_fabfile.py
Created December 27, 2018 18:43
fetch logs
from fabric import Connection
from invoke import task
import dns.resolver
import ipaddress
import sys
@task
def Mpw(cnt,domain):
print "MX records for {}".format(domain)
from bs4 import BeautifulSoup
import lxml
import requests
import pandas as pd
from tabulate import tabulate
soup = BeautifulSoup(open('test.html'), 'lxml')
table = soup.find_all('table')[1]