Saturday, November 16, 2019

Saturday, July 27, 2019

Salary Analysis

Problem
To find the Average Salary of a role in a company
In this example I am going try guess the salary of a Software Development Manager @ Amazon in the State of California.

Disclaimer
The information in this weblog is provided “AS IS” with no warranties, and confers no rights. This weblog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion. Feel free to challenge me, disagree with me, or tell me I’m completely nuts in the comments section of each blog entry, but I reserve the right to delete any comment for any reason whatsoever (abusive, profane, rude, or anonymous comments) – so keep it polite, please. This is post is to show you how to do Analysis and the resources available. My Analysis is not accurate and very vague.

Analysis

  1. levelsfyi.com
    1. https://levelsfyi.com/amazon-levels-salary/
    2. One of the section in this page is about salaries. I filtered it to "software development manager" and I was able to see base salary, bonus, stock and total yearly compensation
    3. I see a pay range of 200,000 to 300,000 (base salary + bonus + stocks) across L5 and L6 levels
  2. GlassDoor
    1. Go to https://www.glassdoor.com/Reviews/amazon-reviews-SRCH_KE0,6.htm
    2. I am interested in the Amazon salaries in that list
    3. Filtering by Software Development Manager and Location California shows Salary of $160,000 to $170,000
  3. Pay Scale
    1. https://www.payscale.com/research/US/Employer=Amazon.com_Inc/Salary
    2. 2 page has salary for SDM
    3. https://www.payscale.com/research/US/Employer=Amazon.com_Inc/Bonus
    4. I am using the SDE bonus as SDM bonus since I didn't find any bonus for SDM
    5. I see a rangle 190,000 to 200,000 for SDM (salary + bonus)
  4. United States Department of Labor
    1. Goto https://lcr-pjr.doleta.gov/index.cfm?event=ehLCJRExternal.dspLCRLanding
    2. Use the Quick Search
      1. Leave Case Type as All
      2. Job Title as Software Development Manager
      3. State as California
      4. Employer Name as Amazon
      5. Start Date : 6 months ago
      6. End Date : Today
      7. Click Search
    3. Results Page
      1. Your search may not return results in that case change your search try again
      2. I got 3 results for my search
      3. Click the HTML report icon in the last column of each of the report
      4. It opens the application for that case
    4. Case Application Page
      1. Under section G you will find the offered wage
      2. In my example it is 165,000 to 185,000 for all the 3 cases
Conclusion
I am guessing the salary of an SDM @ Amazon to be in the range of 190,000 to 230,000 (salary + bonus + stocks)





Friday, October 12, 2018

AWS S3 delete all unversioned buckets using AWS CLI

aws s3 ls | awk '{print $3}' | grep -v do-not-delete | xargs -L 1 -I {} aws s3 rb s3://'{}' --force

Wednesday, June 27, 2018

View a very long line in unix terminal using VIM editor

Steps to view a very long line in vim

  1. Open the file in vim
  2. Goto very long line
  3. write that line to temp file
  4. exit vim
  5. cat that temp file
Commands
  1. vim my_log_file.log
  2. :2345
  3. :2345w /tmp/very_long_line.txt
  4. :q!
  5. cat /tmp/very_long_line.txt

Tuesday, May 15, 2018

Directly open gz log files in vim

To open .gz which has log files directly in vim editor

create or update .vimrc file with below code
augroup gzip
 autocmd!
 autocmd BufReadPre,FileReadPre *.gz set bin
 autocmd BufReadPost,FileReadPost   *.gz '[,']!gunzip
 autocmd BufReadPost,FileReadPost   *.gz set nobin
 autocmd BufReadPost,FileReadPost   *.gz execute ":doautocmd BufReadPost " . expand("%:r")
 autocmd BufWritePost,FileWritePost *.gz !mv <afile> <afile>:r
 autocmd BufWritePost,FileWritePost *.gz !gzip <afile>:r
 autocmd FileAppendPre      *.gz !gunzip <afile>
 autocmd FileAppendPre      *.gz !mv <afile>:r <afile>
 autocmd FileAppendPost     *.gz !mv <afile> <afile>:r
 autocmd FileAppendPost     *.gz !gzip <afile>:r
augroup END
 vim apple.gz will open the log file directly in the editor

Reference : https://stackoverflow.com/questions/5396363/how-to-open-gzip-text-files-in-gvim-without-unzipping

                          Thursday, September 21, 2017

                          zip to gzip


                          Assume you are in a directory which has few zip files. Each zip file has a large text file in it. You need to convert the zip file to gzip using unix command. Below is the command. You put all of them in1 line. For readability statements are in their own line

                          for f in *.zip; 
                          do 
                          unzip $f; 
                          mv ./*.txt `basename $f .zip`.txt;
                          gzip ./*.txt; 
                          done