Skip to content

Instantly share code, notes, and snippets.

View rahulroshan96's full-sized avatar

Rahul Roshan rahulroshan96

View GitHub Profile
import java.io.*;
import java.util.*;
class Write{
Write(String input, String output, String T) throws FileNotFoundException, IOException{
if(T.equals("M")){
minute(input, output);
}
if(T.equals("H")){
hour(input, output);
@rahulroshan96
rahulroshan96 / interviewitems.MD
Created April 1, 2017 03:38 — forked from amaxwell01/interviewitems.MD
My answers to over 100 Google interview questions

##Google Interview Questions: Product Marketing Manager

  • Why do you want to join Google? -- Because I want to create tools for others to learn, for free. I didn't have a lot of money when growing up so I didn't get access to the same books, computers and resources that others had which caused money, I want to help ensure that others can learn on the same playing field regardless of their families wealth status or location.
  • What do you know about Google’s product and technology? -- A lot actually, I am a beta tester for numerous products, I use most of the Google tools such as: Search, Gmaill, Drive, Reader, Calendar, G+, YouTube, Web Master Tools, Keyword tools, Analytics etc.
  • If you are Product Manager for Google’s Adwords, how do you plan to market this?
  • What would you say during an AdWords or AdSense product seminar?
  • Who are Google’s competitors, and how does Google compete with them? -- Google competes on numerous fields: --- Search: Baidu, Bing, Duck Duck Go
@rahulroshan96
rahulroshan96 / bobp-python.md
Created May 26, 2017 06:42 — forked from sloria/bobp-python.md
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
sudo wget https://s3-us-west-2.amazonaws.com/avi-tmp-cus/multi_az_docker_install.tar.gz -O /home/aviuser/docker_install.tar.gz
sudo cd /home/aviuser/
sudo tar -xvf /home/aviuser/docker_install.tar.gz
ip=`ifconfig | grep -A 1 'eth0' | tail -1 | cut -d ':' -f 2 | cut -d ' ' -f 1`
sudo ./avi_baremetal_setup.py -i $ip -c -cc 4 -cm 12 -m $ip
wget https://s3-us-west-2.amazonaws.com/avi-tmp-cus/multi_az_docker_install.tar.gz -O /home/aviuser/docker_install.tar.gz
cd /home/aviuser/
tar -xvf /home/aviuser/docker_install.tar.gz
ip=`ifconfig | grep -A 1 'eth0' | tail -1 | cut -d ':' -f 2 | cut -d ' ' -f 1`
echo $1 $2
wget https://s3-us-west-2.amazonaws.com/avi-full-access/setup_avi.json -O /home/aviuser/setup_avi.json
sed -e "s/1.1.1.1/$1/" -e "s/2.2.2.2/$2/" /home/aviuser/setup_avi.json > /home/aviuser/setup_avi1.json
sudo ./avi_baremetal_setup.py -i $ip -c -cc 4 -cm 12 -m $ip --setup /home/aviuser/setup_avi1.json
echo "se_ip1" > $1
echo "se_ip2" > $2
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {},
"variables": {},
"resources": [],
"outputs": {
"greetingMessage": {
"value": "Hello World",
"type" : "string"
set -x
userfile="/var/lib/cloud/instance/user-data.txt"
if [ -e $userfile ]; then #if file is present
resourceGroup=$(curl -H Metadata:true "http://169.254.169.254/metadata/instance/compute/resourceGroupName?api-version=2017-08-01&format=text")
sudo sed -e 's/AVI-RESOURCE-GROUP/$resourceGroup/g' $userfile > $userfile
sudo cat $userfile
sudo reboot
fi
echo `date` > /tmp/rahul.sh
apt-get update
apt-get install tmux, git -y
cd /opt/avi/
git init