Skip to content

Instantly share code, notes, and snippets.

View tonidezman's full-sized avatar
🎯
Focusing

Toni Dezman tonidezman

🎯
Focusing
View GitHub Profile
@milmazz
milmazz / imposter-handbook-links.md
Last active April 1, 2024 10:31
Useful links found in The Imposter's Handbook by Rob Conery
http://flukeout.github.io/
#01 plate
#02 bento
#03 #fancy
#04 plate > apple
#05 #fancy pickle
#06 .small
#07 orange.small
#08 bento > orange.small
@olih
olih / jq-cheetsheet.md
Last active April 20, 2024 06:34
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@vasanthk
vasanthk / System Design.md
Last active April 26, 2024 13:40
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?
@mdang
mdang / RAILS_CHEATSHEET.md
Last active April 13, 2024 15:36
Ruby on Rails Cheatsheet

Ruby on Rails Cheatsheet

Architecture

Create a new application

Install the Rails gem if you haven't done so before

@stupidbodo
stupidbodo / consistent-hashing.py
Created December 31, 2015 02:46
Consistent Hashing Example - Python
from hashlib import md5
from bisect import bisect
class Ring(object):
def __init__(self, server_list, num_replicas=3):
nodes = self.generate_nodes(server_list, num_replicas)
hnodes = [self.hash(node) for node in nodes]
hnodes.sort()
@cansadadeserfeliz
cansadadeserfeliz / tests.py
Last active December 28, 2022 09:20
Mock/replace timezone.now() with a custom date in Django unittes
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import datetime
from mock import patch
from django.test import TestCase
from django.utils import timezone
class DatesTestCase(TestCase):
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active April 20, 2024 16:52
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.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@brysgo
brysgo / post_checkout_migrations.sh
Last active October 5, 2019 11:13 — forked from skyriverbend/rails_switch_branch.py
Post checkout hook for managing rails migrations and bundle install
CHECKING_OUT_BRANCH=$3
OLD_BRANCH=$1
NEW_BRANCH=$2
if [ $CHECKING_OUT_BRANCH -eq 1 ]
then
FILES_CHANGED=`git diff $OLD_BRANCH $NEW_BRANCH --name-status`
MIGRATIONS_REMOVED=`echo "$FILES_CHANGED" | egrep 'D\tdb/migrate/([0-9]+)' | sort -r`
MIGRATIONS_ADDED=`echo "$FILES_CHANGED" | egrep 'A\tdb/migrate/([0-9]+)'`
@tomas-stefano
tomas-stefano / Capybara.md
Last active April 25, 2024 16:44
Capybara cheatsheet

Capybara Actions

# Anchor
click_link 'Save'

# Button
click_button 'awesome'

# Both above