Skip to content

Instantly share code, notes, and snippets.

Avatar

Arun Ravindran arocks

View GitHub Profile
View 20111011_SteveYeggeGooglePlatformRant.md

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@arocks
arocks / greet.el
Created Sep 21, 2020
Emacs greeting appearing in the *scratch* buffer that changes based on the time of the day and day of the week.
View greet.el
;; Initial scratch buffer greeting
(defun arun/greet-by-hour ()
"Greet morning/evening/afternoon based on time of the day"
(let ((hour (string-to-number (format-time-string "%H"))))
(cond ((< hour 12) "morning")
((< hour 18) "afternoon")
(t "evening"))))
(setq user-full-name "Arun Ravindran")
@arocks
arocks / secret_key.sh
Created Feb 4, 2019
Create a new environment variable called SECRET_KEY with a new random value
View secret_key.sh
heroku config:set SECRET_KEY=(python -c 'import random; import string; print("".join([random.SystemRandom().choice("{}{}{}".format(string.ascii_letters, string.digits, string.punctuation)) for i in range(50)]))')
View hello.py
"""A simple hello application in Python 3.6"""
പേര്: str = input("What is your name? ")
print(f"Hey {പേര്}!")
@arocks
arocks / hangman.py
Last active Feb 16, 2016 — forked from danverbraganza/hangman.py
Hangman implemented in 3 lines of Python
View hangman.py
# -*- coding: utf-8 -*-
"""A simple text-based game of hangman
A re-implementation of Hangman 3-liner in more idiomatic Python 3
Original: http://danverbraganza.com/writings/hangman-in-3-lines-of-python
Requirements:
A dictionary file at /usr/share/dict/words
Usage:
@arocks
arocks / raffle.py
Created May 1, 2015
Randomly pick a twitter username n times and show the last picked as winner
View raffle.py
# -*- coding: utf-8 -*-
""" raffle - Randomly pick a twitter username n times and show the last picked as winner"""
import random, time
TIMES = 20
entries = """
https://twitter.com/username1
https://twitter.com/username2
https://twitter.com/username3
@arocks
arocks / Emacs-Python
Created Apr 25, 2015
Outline of my lightning talk "Emacs and Python" at Bangpypers April 2015
View Emacs-Python
# Emacs and Python
## Why?
## Intro
- Arun Ravindran <arunrocks.com> @arocks
- Emacs user for 15 years
- Python user for 13 years
- Author of "Django Design Patterns and Best Practices"
View bash_prompt.sh
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the active virtualenv
# * the branch/status of the current git repository
# * the return value of the previous command
# * the fact you just came from Windows and are used to having newlines in
# your prompts.
View DJANGO_TWISTED_HAPROXY.md

Serving Django and Twisted using HAproxy

  • on the same IP
  • on the same Port 80

Why?

coming...

Who?