Skip to content

Instantly share code, notes, and snippets.

View liveashish's full-sized avatar

Ashish Kumar Sahoo liveashish

View GitHub Profile
@liveashish
liveashish / clouds.md
Created April 23, 2018 13:00 — forked from miglen/clouds.md
AWS & GCP explained in simple English

Amazon Web Services (AWS) & Google Cloud Platform (GCP) explained in simple English

This guide is only representative from my point of view and it may not be accurate and you should go on the official AWS & GCP websites for accurate and detailed information. It's initially inspired by AWS in simple English and GCP for AWS professionals. The idea is to compare both services, give simple one-line explanation and examples with other software that might have similiar capabilities. Comment below for suggestions.

Category Service AWS GCP Description It's like
Compute IaaS Amazon Elastic Compute Cloud (EC2) Google Compute Engine Type-1 virtual servers VMware ESXi, Citrix XenServer
  PaaS AWS Elastic Beanstalk Google App Engine Running your app on a platform
@liveashish
liveashish / install.sh
Created September 26, 2017 10:03
A script to install Django, configure nginx, setup gunicorn and run the server
echo "Starting Django Setup...";
sudo apt-get update
sudo apt install python-pip
sudo pip install git
read -p "Enter the .git URL to be cloned:" git_url
git clone $git_url
sudo pip install gunicorn
sudo apt-get install nginx
ls;read -p "Enter the Django Project Directory: " $django_project_dir
sudo apt-get install libmysqlclient-dev
PROJECTNAME=teamwork
APPNAME=worktogether
PROJECTDIR=/home/ubuntu/$PROJECTNAME/
LOGFILE=$PROJECTDIR'log/gunicorn.log'
ERRORFILE=$PROJECTDIR'log/gunicorn-error.log'
NUM_WORKERS=3
ADDRESS=127.0.0.1:8000
#!/bin/bash
ip=$(curl -s http://whatismyip.akamai.com/)
SERVER_NAME=$ip
events{}
http{
server {
listen 80;
server_name $SERVER_NAME;
client_body_timeout 24s;
client_header_timeout 24s;
keepalive_timeout 30s;
@liveashish
liveashish / spamhaha.py
Last active March 19, 2019 03:17
Sarahah spam bot: A life saver! 🔥 💪
import time
import requests
users_to_attack = ['USER_NAME', ] #list of users to be attacked
def sarahah_post(user, msg):
s = requests.Session()
homeurl = 'https://' + user + '.sarahah.com/'
home = s.get(homeurl)
@liveashish
liveashish / resume_parser.py
Last active May 12, 2017 11:31
RecruitPlus resume Parser Wrapper
import json
from zeep import Client
from lxml import etree
import xml.etree.ElementTree
import xmltodict
uploaded_resume = request.FILES['file']
uploaded_file_content = ""
#handles file size
@liveashish
liveashish / linkedin.js
Created April 6, 2017 09:48
Send auto invite on Linkedin
$("button[class='mn-person-card__person-btn-ext button-secondary-medium']").each(function(index, value) {
setTimeout(function() {
jQuery(value).trigger('click');
}, index * 1000);
});
<?php
// In case one is using PHP 5.4's built-in server
$filename = __DIR__ . preg_replace('#(\?.*)$#', '', $_SERVER['REQUEST_URI']);
if (php_sapi_name() === 'cli-server' && is_file($filename)) {
return false;
}
// Require composer autoloader
require __DIR__ . '/vendor/autoload.php';