Skip to content

Instantly share code, notes, and snippets.

View kirankotari's full-sized avatar
:octocat:
Coming back up-to speed, need a bit more time.

Kiran Kumar Kotari kirankotari

:octocat:
Coming back up-to speed, need a bit more time.
View GitHub Profile
List of all AWS servers
AWS (Amazon Web Services) - this company provides PUBG servers. Not all of them uses in a game, but there is full Server - IP list. Maybe this info can be useful for you:
US EAST - North Virginia
us-east-1 - 23.23.255.255
us-east-1 - 34.192.0.54
us-east-1 - 34.224.0.252
us-east-1 - 50.17.255.254
us-east-1 - 50.19.255.254
us-east-1 - 52.1.255.254
@kirankotari
kirankotari / in-place-merge-sort.py
Created April 17, 2019 12:24 — forked from m00nlight/gist:a076d3995406ca92acd6
Python merge sort in place, so space complexity is O(1)
import random
def merge_sort(xs):
"""Inplace merge sort of array without recursive. The basic idea
is to avoid the recursive call while using iterative solution.
The algorithm first merge chunk of length of 2, then merge chunks
of length 4, then 8, 16, .... , until 2^k where 2^k is large than
the length of the array
"""
#!/bin/bash
echo 'Starting Provision: lb1'
sudo apt-get update
sudo apt-get install -y nginx
sudo service nginx stop
sudo rm -rf /etc/nginx/sites-enabled/default
sudo touch /etc/nginx/sites-enabled/default
echo "upstream testapp {
server 10.0.0.11;
#!/bin/bash
echo 'Starting Provision: web'$1
sudo apt-get update
sudo apt-get install -y nginx
echo "<h1>Machine: web"$1"</h1>" >> /usr/share/nginx/html/index.html
echo 'Provision web'$1 'complete'
@kirankotari
kirankotari / vagrant-cheat-sheet.md
Created February 12, 2019 16:30 — forked from wpscholar/vagrant-cheat-sheet.md
Vagrant Cheat Sheet

Typing vagrant from the command line will display a list of all available commands.

Be sure that you are in the same directory as the Vagrantfile when running these commands!

Creating a VM

  • vagrant init -- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.
  • vagrant init <boxpath> -- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64.

Starting a VM

  • vagrant up -- starts vagrant environment (also provisions only on the FIRST vagrant up)
@kirankotari
kirankotari / emailer.py
Created May 16, 2016 04:28 — forked from sarahholderness/emailer.py
Python scripts to read a list of customer emails and send an email with the daily weather forecast
import weather
import smtp
'''
Send a greeting email to our customer email list
with the daily weather forecast and schedule
'''
def get_emails():
# Reading emails from a file