Skip to content

Instantly share code, notes, and snippets.

View raorao's full-sized avatar

Srinivas Rao-Mouw raorao

  • San Francisco, CA
View GitHub Profile
raorao /
Last active October 10, 2019 20:16
Applying large changes to co-owned repos


  • a script that can make all necessary changes, with no manual intervention.

Steps for Implementer

  1. check out master, run the script, commit the result
git fetch origin
git checkout master
raorao /
Last active March 27, 2024 23:21
PR Comment Emojis

Any top-level comment on pull request ought be tagged with one of four emojis:

  • for a non-blocking comment that asks for clarification. The pull request author must answer the question before the pull request is merged, but does not have to wait for the comment author to re-review before merging.

  • 🎨 for a non-blocking comment that proposes a refactor or cleanup. The pull request author does not have to address the comment for the pull request to merge.

  • ⚠️ for a blocking comment that must be addressed before the pull request can merge. The comment's author should leave a Request Changes review, and is responsible for re-reviewing once the pull request author has addressed the issue.

  • 😻 for a comment that compliments the author for their work.

td {
border: 1px solid black;
width: 40px;
height: 40px;
raorao / ets_cache.ex
Last active August 25, 2022 20:14
Simple ETS based cache with TTL
defmodule RequestCache do
@moduledoc """
Simple ETS-based cache.
use GenServer
@type t :: %{ttl: integer, invalidators: %{}}
@type cache_key :: any
@type cache_value :: any
raorao / gen_server_cache.ex
Created May 12, 2017 04:30
Simple Process cache in Elixir.
defmodule RequestCache do
@moduledoc """
Simple GenServer-based cache.
use GenServer
@type t :: %{cache: %{optional(cache_key) => cache_value}, interval: integer}
@typep cache_key :: any
@typep cache_value :: any
# nil
GroceryList.add("a gallon of milk")
# :ok
# "a gallon of milk"
raorao / progress.sass
Last active September 4, 2015 20:00
how I used to write sass --> how i write it now.
// how I used to write sass!
// -----------------------
// its short, sure, but short doesn't necessarily mean simple. Its very difficult for me
// to tell how a given element gets its styles -- element-1 is getting inherited styles
// from its container, and then has two different explicit selectors. At scale,
// its even harder to tell what overrides what, and file ordering begins to actually
// matter. Whenever I see code like this now, I refactor it asap -- before
// it gets too unwieldy and brittle to change.
font: 15px verdana

Keybase proof

I hereby claim:

  • I am raorao on github.
  • I am raorao ( on keybase.
  • I have a public key whose fingerprint is 2B05 C1E8 A751 C8FF DE93 20B6 CC2B F1A1 2EC2 F87E

To claim this, I am signing this object:

raorao /
Last active August 29, 2015 14:18

bar foo

Query = {} = function() {
var queryAttributes = {
filters: [],
beginDate: null,
endDate: null,
attribute: null