Skip to content

Instantly share code, notes, and snippets.

View dan-null's full-sized avatar

Daniel Barajas dan-null

View GitHub Profile
@dan-null
dan-null / System Design.md
Created August 31, 2020 14:09 — 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?
@dan-null
dan-null / cookiemonster.go
Created May 2, 2020 23:02 — forked from dacort/cookiemonster.go
Simple script to extract (encrypted) cookies out of Chrome OS X cookie store. Usage: ./cookiemonster domain.com
package main
import (
"code.google.com/p/go.crypto/pbkdf2"
"crypto/aes"
"crypto/cipher"
"crypto/sha1"
"database/sql"
"fmt"
"log"
@dan-null
dan-null / AdbCommands
Created April 20, 2020 21:28 — forked from Pulimet/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@dan-null
dan-null / EventObserver.kt
Created April 15, 2020 00:53 — forked from JoseAlcerreca/EventObserver.kt
An Observer for Events, simplifying the pattern of checking if the Event's content has already been handled.
/**
* An [Observer] for [Event]s, simplifying the pattern of checking if the [Event]'s content has
* already been handled.
*
* [onEventUnhandledContent] is *only* called if the [Event]'s contents has not been handled.
*/
class EventObserver<T>(private val onEventUnhandledContent: (T) -> Unit) : Observer<Event<T>> {
override fun onChanged(event: Event<T>?) {
event?.getContentIfNotHandled()?.let { value ->
onEventUnhandledContent(value)
@dan-null
dan-null / BASH: ISO 8601 Timestamp with Milliseconds
Created March 29, 2020 17:31 — forked from sloanlance/ BASH: ISO 8601 Timestamp with Milliseconds
How to get an ISO 8601 timestamp with milliseconds in BASH
Gist title: "BASH: ISO 8601 Timestamp with Milliseconds"
Summary: How to get an ISO 8601 timestamp with milliseconds in BASH
@dan-null
dan-null / TwoSum.ahk
Created March 27, 2020 03:55 — forked from errorseven/TwoSum.ahk
TwoSum - Solutions: Naive O(n2), Sorted O(nlogn), Hash O(n)
/*
_____ __
/__ \__ _____ / _\_ _ _ __ ___
/ /\/\ \ /\ / / _ \\ \| | | | '_ ` _ \
/ / \ V V / (_) |\ \ |_| | | | | | |
\/ \_/\_/ \___/\__/\__,_|_| |_| |_|
Coded by errorseven @ 1/26/17
The two sum problem is a common interview question, and it is a variation of the
subset sum problem. There is a popular dynamic programming solution for the