Skip to content

Instantly share code, notes, and snippets.

View Bharat-B's full-sized avatar

Bharat B Bharat-B

  • Secunderabad,Andhra Pradesh, India.
View GitHub Profile
@Bharat-B
Bharat-B / README.md
Last active February 3, 2024 05:12
A python script that downloads multiple files in parallel with support for s3:// | http:// | https:// protocols

Python

A script that downloads multiple files in parallel with support for s3:// | http:// | https:// protocols

Description

downloader.py

Usage: python downloader.py url1 url2 url3

@Bharat-B
Bharat-B / hostname.conf
Created February 23, 2018 08:22
WHMCS nGINX rules for SSL / Non SSL
### NON SSL | STANDARD HTTP
server {
listen 80;
server_name domain.com;
root /path/to/whmcs;
index index.php index.html;
access_log /var/log/nginx/domain.com.log combined;
access_log /var/log/nginx/domain.com.bytes bytes;
error_log /var/log/nginx/domain.com.error.log error;
location / {
@Bharat-B
Bharat-B / keybase.md
Last active September 28, 2017 12:27
Keybase

Keybase proof

I hereby claim:

  • I am bharat-b on github.
  • I am bharatb (https://keybase.io/bharatb) on keybase.
  • I have a public key ASD8PaDhbgWnjD_BGah4s6x7EmgOC__2VlYea3dhotCf2Qo

To claim this, I am signing this object:

@Bharat-B
Bharat-B / backup.sh
Last active March 21, 2017 10:15
Bash script to backup any organization's github repositories to AWS S3 and post notifications to slack channel
#!/bin/bash
#Define variables
now=`date "+%Y-%m-%d-%H-%M-%S"`
#Github Organization
GB_ORG=""
#Github Username
GB_USR=""
#Github Password
GB_PWD=""
@Bharat-B
Bharat-B / imap.php
Last active October 10, 2020 07:30
php-imap-class
<?php
class IMAP {
protected $constring;
protected $connection;
protected $extensions = array( "txt", "jpg", "jpeg", "png", "xls", "doc", "docx", "xlsx", "zip", "rar", "pdf" );
protected $mimeType = array( "text", "multipart", "message", "application", "audio", "image", "video", "other" );
@Bharat-B
Bharat-B / report.py
Created November 29, 2015 18:49
OpenVZ node information reporter
#!/usr/bin/python
import subprocess
import platform
import urllib2
import urllib
#Add your url to post data here
server_url = "url_to_post_here"
def bash(command):