Skip to content

Instantly share code, notes, and snippets.

View userimack's full-sized avatar

Mahendra Yadav userimack

View GitHub Profile
@userimack
userimack / System Design.md
Created January 25, 2020 17:41 — 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?
@userimack
userimack / br.sh
Created January 25, 2020 10:00 — forked from dmkash/br.sh
Shell Script for tmux setup
#!/bin/sh
SESSION_NAME="big_red"
cd ~/Sites/within3/big_red
tmux has-session -t ${SESSION_NAME}
if [ $? != 0 ]
then

FWIW: I didn't produce the content presented here (the outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?

@userimack
userimack / postgres_queries_and_commands.sql
Created February 23, 2018 10:05 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(query_start, clock_timestamp()), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@userimack
userimack / 0_reuse_code.js
Created July 26, 2017 07:40
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
#-*-coding:utf-8-*-
from itertools import permutations as pmt
import argparse
import math
import re
class combrider(object):
def __init__(self, *args, **kwargs):
self.lists = args
@userimack
userimack / learning_resources.md
Created December 22, 2016 13:01 — forked from nathansmith/web-design-development-learning-resources.md
Resources for learning web design & front-end development
@userimack
userimack / Reset-DS1307
Created July 12, 2016 12:45 — forked from buildcircuit/Reset-DS1307
Reset DS1307 real time clock
//Arduino 1.0+ Only
//Arduino 1.0+ Only
#include "Wire.h"
#define DS1307_ADDRESS 0x68
byte zero = 0x00; //workaround for issue #527
void setup(){
Wire.begin();
@userimack
userimack / The Technical Interview Cheat Sheet.md
Created February 19, 2016 02:57 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.