Skip to content

Instantly share code, notes, and snippets.

View tonidezman's full-sized avatar
🎯
Focusing

Toni Dezman tonidezman

🎯
Focusing
View GitHub Profile
@cansadadeserfeliz
cansadadeserfeliz / tests.py
Last active September 8, 2024 23:22
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):
@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()
@mdang
mdang / RAILS_CHEATSHEET.md
Last active January 22, 2026 21:16
Ruby on Rails Cheatsheet

Ruby on Rails Cheatsheet

Architecture

Create a new application

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

@vasanthk
vasanthk / System Design.md
Last active March 6, 2026 17:48
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?
@olih
olih / jq-cheetsheet.md
Last active March 3, 2026 15:02
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

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
@milmazz
milmazz / imposter-handbook-links.md
Last active January 17, 2025 12:36
Useful links found in The Imposter's Handbook by Rob Conery
@baweaver
baweaver / open_source.md
Created December 2, 2016 18:14
So you want to start on Open Source?

So you want to start on Open Source?

A short guide for getting you started into the magical world of OSS.

What is your passion?

Are you a musician? Look for musical tools. Are you an artist? Look for some graphics libraries. Find something that works with your other passions to get you going.

If your passion is programming, look for ways to improve the environment.

@baweaver
baweaver / ruby_books.md
Last active November 2, 2025 22:21
A list of books for learning and expanding on your Ruby knowledge.

Ruby Book List

Learning Ruby

You're taking your first steps into Ruby

A good introduction to programming in general. Easy on newer programmers.

@chrisman
chrisman / css-diner.txt
Created August 2, 2017 18:21
solutions for css diner
# https://flukeout.github.io/ #
01. plate
02. bento
03. #fancy
04. plate apple
05. #fancy pickle
06. .small
07. orange.small
08. bento orange.small