Skip to content

Instantly share code, notes, and snippets.

Srinivas Rao-Mouw raorao

Block or report user

Report or block raorao

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@raorao
raorao / large_changes.md
Last active Oct 10, 2019
Applying large changes to co-owned repos
View large_changes.md

Prerequisties

  • 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
raorao / pr-comment-emojis.md
Last active Aug 30, 2019
PR Comment Emojis
View pr-comment-emojis.md

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.

View foo.html
<html>
<body>
<style>
td {
border: 1px solid black;
width: 40px;
height: 40px;
}
</style>
@raorao
raorao / ets_cache.ex
Last active May 12, 2017
Simple ETS based cache with TTL
View ets_cache.ex
defmodule RequestCache do
@moduledoc """
Simple ETS-based cache.
"""
use GenServer
@type t :: %{ttl: integer, invalidators: %{}}
@type cache_key :: any
@type cache_value :: any
@raorao
raorao / gen_server_cache.ex
Created May 12, 2017
Simple Process cache in Elixir.
View gen_server_cache.ex
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
View elixir-and-fp-1.rb
GroceryList.start
GroceryList.next
# nil
GroceryList.add("a gallon of milk")
# :ok
GroceryList.next
# "a gallon of milk"
@raorao
raorao / progress.sass
Last active Sep 4, 2015
how I used to write sass --> how i write it now.
View progress.sass
// 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.
.container-element
font: 15px verdana
View keybase.md

Keybase proof

I hereby claim:

  • I am raorao on github.
  • I am raorao (https://keybase.io/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:

View queryInterface.js
Query = {}
Query.new = function() {
var queryAttributes = {
filters: [],
beginDate: null,
endDate: null,
attribute: null
}
You can’t perform that action at this time.