Skip to content

Instantly share code, notes, and snippets.

View snallami's full-sized avatar

Suresh Nallamilli snallami

  • Los angeles, CA
View GitHub Profile
@snallami
snallami / aws-userdate-http
Last active March 19, 2023 22:02
start httpd server from AWS user data
#!/bin/bash
yum update -y
yum install -y httpd
systemctl start httpd
systemctl enable httpd
echo "<h1> Hello from $(hostname -f) </h1>" > /var/www/html/index.html
One of the greatest ways that you add value and make important contributions is:
Your dedicated effort to do the best and goal-oriented attitude
For example, I can think of two scenarios.
- Scenario1 :
I found you to be quite Goal oriented. Right from 8th/9th grade, you seems to have a clear target
in mind on what to do in future and you marched towards it with absolute dedication and kept the unncessary noise/distractions
at Bay. Also, you tried to help others by offering construictive advice but never crossed boundaries.
- Scenario2:
@snallami
snallami / ChangePassword.java
Created January 7, 2020 07:25 — forked from zach-klippenstein/ChangePassword.java
The keystore password on Java keystore files is utterly pointless. You can reset it without knowing it, as shown by this code. Note that private keys are still secure, as far as I know. The JKS implementation is copyright Casey Marshall ([email protected]), and the original source is available at http://metastatic.org/source/JKS.java. I've in…
import java.util.*;
import java.io.*;
import java.security.*;
public class ChangePassword
{
private final static JKS j = new JKS();
public static void main(String[] args) throws Exception
{
If minuphours = 0 , code will be evaluating other rules like idle termination time i.e. as if this option doesn't exist.See below code. It prints "Evaluate other rules" message if minUpHours=0
import java.util.concurrent.TimeUnit;
public class MinCheck {
public static void main(String[] args) {
// Check min number of hours instance must be up - if stayed up at least that minimum.
int minUpHours = 0;
(Picked important points from https://github.com/yangshun/tech-interview-handbook/tree/master/preparing )
1) Pick a programming language to do your interviews in. IMO Python or Java are best bets.
Domain-specific position interviews may differ in some companies - Front End/iOS/Android Engineer roles.
2) Leet code and 'Cracking the coding interview'
3) Review your concepts
https://github.com/kdn251/interviews
https://medium.com/basecs
@snallami
snallami / gist:8b3957cd7e1426f393991cd5eb3d39e5
Last active May 16, 2019 21:46
Tech Interview preparation
(Picked important points from https://github.com/yangshun/tech-interview-handbook/tree/master/preparing )
1) Pick a programming language to do your interviews in. IMO Python or Java are best bets.
Domain-specific position interviews may differ in some companies - Front End/iOS/Android Engineer roles.
2) Master through practice
a) http://www.crackingthecodinginterview.com/ --> Buy this book and read it
b) For online practice
@snallami
snallami / gist:6139703b6fa870d8dc26cc1ee9cbfdbf
Created June 26, 2018 03:07
ec2-user permissions in docker file
#!/bin/sh
groupadd --gid 500 ec2-user
useradd --gid 500 --uid 500 ec2-user
mkdir /data && chown ec2-user:ec2-user /data
mkdir /etc/sudoers.d/
echo "ec2-user ALL=(ALL) NOPASSWD: ALL">/etc/sudoers.d/ec2-user
Gopal Nallamilli Salary
April 2018: $12.00 ($10.00 Salary + $2.00 bonus)
May 2018 : $12.00 ($10.00 Salary + $2.00 bonus)
Total Sal: $24.00
git config --global core.sshCommand 'ssh -i /home/ec2-user/.ssh/id_rsa_stage'
@snallami
snallami / i3
Created October 4, 2017 03:44
Mount i3 ephermal disk
create_cachefs() {
echo "${FUNCNAME[0]}"
BLOCK_DEVICE='/dev/nvme0n1'
NVME_CACHE_MOUNT_POINT='/cache-fs'
SERVICE_USER_NAME='tooladmin'
# Only set this up if we have an nvme ephemeral
if [[ ! -e ${BLOCK_DEVICE} ]] ; then
echo "FAILURE: Service needs a specific amazon instance type"