Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am marioaquino on github.
  • I am marioaquino (https://keybase.io/marioaquino) on keybase.
  • I have a public key ASASn-BeYHpDtC7gaMoMBQumLZzCHM4GBamz1PuCcxOg3go

To claim this, I am signing this object:

@marioaquino
marioaquino / System Design.md
Created April 18, 2016 15:04 — forked from vasanthk/System Design.md
System Design Cheatsheet

#System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

##Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@marioaquino
marioaquino / rust_roman_numeral_kata
Created March 4, 2016 15:51
Rust Roman Numeral Kata (Lambda Lounge 3/16)
// use std::io;
fn main() {
// println!("What is your favorite color?");
println!("{}", 5);
}
fn get_input()->i32{
@marioaquino
marioaquino / tmux.conf
Last active September 25, 2020 16:31
This tmux config includes mouse click for window selection, wheel scrolling, custom leader key, and OS-level copy/paste support
# Make Ctrl+\ the tmux leader combination
unbind C-b
set -g prefix "C-\\"
bind "C-\\" send-prefix
setw -g xterm-keys on
set -g default-terminal "screen-256color"
set -sg escape-time 0
set -g base-index 1
@marioaquino
marioaquino / emacs_cheatsheet
Last active October 20, 2019 15:01
Emacs Cheatsheet
Add new line below the line you are in :: Ctrl + j
Backward search :: Ctrl + r
Barf left :: Ctrl + {
Barf right :: Ctrl + }
Cancel out of the mess you've gotten yourself into :: Ctrl + g
Close current window :: Ctrl + x + 0
Complete word at cursor :: Meta + /
Copy selected text into clipboard :: Meta + w
Delete character forward :: Ctrl + d
Delete word forward :: Meta + d
For each Ruby module/class, we have Ruby methods on the left and the equivalent
Clojure functions and/or relevant notes are on the right.
For clojure functions, symbols indicate existing method definitions, in the
clojure namespace if none is explicitly given. clojure.contrib.*/* functions can
be obtained from http://github.com/kevinoneill/clojure-contrib/tree/master,
ruby-to-clojure.*/* functions can be obtained from the source files in this
gist.
If no method symbol is given, we use the following notation:
@marioaquino
marioaquino / evaluation.clj
Created May 12, 2014 03:00
Clojure evaluation order
(defn left []
(println "Left")
"Left")
(defn right []
(println "Right")
"Right")
(defn middle [a b]
(println "Middle " a b)
@marioaquino
marioaquino / format.clj
Created April 15, 2014 23:49
Clojure/edn formatter
(ns segmentation.util.format
(:require [clojure.pprint :refer [pprint with-pprint-dispatch code-dispatch]]
[rewrite-clj.parser :as p]
[rewrite-clj.printer :as prn]))
(defn is-token-sandwich [triplet]
(let [first-token (-> triplet first first)
second-token (-> triplet second first)
result (and (not= first-token :newline) (= second-token :whitespace))]
result))
/*
* jQuery Mobile v1.3.2
* http://jquerymobile.com
*
* Copyright 2010, 2013 jQuery Foundation, Inc. and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
*/
@marioaquino
marioaquino / input.txt
Last active December 21, 2015 05:49
Given a file (input.txt) that looks like the one below, sum the sizes of the files and print out the values for each file.
1082129 tags/Quorum 1.7/quorum/dependencies/asm-4.0.jar
1379328 branches/Legam/resources/WindowsAccessibleHandler/WindowsAccessibleHandler/Debug/vc100.idb
1456844 branches/Legam/resources/WindowsAccessibleHandler/x64/Debug/WindowsAccessibleHandler.ilk
1463665 quorum/Run/Default.jar
1472874 tags/Quorum 1.7/QuorumCBCWrapper/BasicMain.jar
1478598 quorum/Run/Default.jar
1516213 quorum/Run/Default.jar
1546495 quorum/Run/Default.jar
1585813 quorum/Run/Default.jar
1603663 quorum/Run/Default.jar