Skip to content

Instantly share code, notes, and snippets.


Surendhar Reddy surendharreddy

View GitHub Profile
View .tmux.conf
unbind-key C-b
set-option -g prefix C-f
# Refresh with source file
bind-key R source-file ~/.tmux.conf
# Use zsh as default shell
set-option -g default-shell /bin/zsh
# Enable mouse support
brew cask install adoptopenjdk/openjdk/adoptopenjdk8
brew cask install android-sdk
# [alternative] echo to profile and source
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
export ANDROID_HOME=/usr/local/share/android-sdk
echo y | sdkmanager "system-images;android-29;google_apis;x86"
yes | sdkmanager --licenses
surendharreddy /
Created Aug 7, 2020 — forked from isaacmg/
A simple example of using a DAG to run a jar file.
from airflow import DAG
from airflow.operators import BashOperator
from datetime import datetime
import os
import sys
args = {
'owner': 'airflow'
, 'start_date': datetime(2017, 1, 27)
, 'provide_context': True
View Base64.js
* Base64 encode/decode
* Inspired by:
const chars =
export const Base64 = {
btoa: (input) => {
let str = input
let output = ''
surendharreddy / slim-redux.js
Created Jan 2, 2020 — forked from gaearon/slim-redux.js
Redux without the sanity checks in a single file. Don't use this, use normal Redux. :-)
View slim-redux.js
function mapValues(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
result[key] = fn(obj[key], key);
return result;
}, {});
function pick(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
if (fn(obj[key])) {
surendharreddy /
Last active Nov 18, 2019
JS Stack Trace with a fix too handle `NoSuchKeyException` when parsing JS stack frames without line numbers. (
* Copyright (c) Facebook, Inc. and its affiliates.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
package com.facebook.react.util;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
surendharreddy /
Created Nov 6, 2019 — forked from maciekish/
Reset Xcode. Clean, clear module cache, Derived Data and Xcode Caches. You can thank me later.
killall Xcode
xcrun -k
xcodebuild -alltargets clean
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache"
rm -rf ~/Library/Developer/Xcode/DerivedData/*
rm -rf ~/Library/Caches/*
open /Applications/

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

surendharreddy /
Created Jun 19, 2019 — forked from nepsilon/
How to change your commit messages in Git? — First published in issue #55

How to change your commit messages in Git?

At some point you’ll find yourself in a situation where you need edit a commit message. That commit might already be pushed or not, be the most recent or burried below 10 other commits, but fear not, git has your back 🙂.

Not pushed + most recent commit:

git commit --amend

This will open your $EDITOR and let you change the message. Continue with your usual git push origin master.

You can’t perform that action at this time.