Skip to content

Instantly share code, notes, and snippets.

@vasanthk
vasanthk / System Design.md
Last active June 17, 2024 10:07
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?
# Towers of Hanoi
#
# Write a Towers of Hanoi game:
# http://en.wikipedia.org/wiki/Towers_of_hanoi
#
# In a class `TowersOfHanoi`, keep a `towers` instance variable that is an array
# of three arrays. Each subarray should represent a tower. Each tower should
# store integers representing the size of its discs. Expose this instance
# variable with an `attr_reader`.
#
@radwane-h
radwane-h / Kata
Last active November 1, 2015 23:36
Kata
Kata Refactoring :
Movie rental by Martin Fowler : [c# version: https://github.com/jpartogi/MovieRental-Kata.NET]
Gilded Rose : [C# version: https://github.com/emilybache/GildedRose-Refactoring-Kata/blob/master/csharp/GildedRose.cs]
Trip service : [C# version: https://github.com/sandromancuso/trip-service-kata/tree/master/c%23]
Trivia : [c# version: https://github.com/jbrains/trivia/tree/master/C%23/Trivia]
Golden Source : https://github.com/emilybache?tab=repositories
@anotheruiguy
anotheruiguy / web-fonts-asset-pipeline.md
Last active May 24, 2023 22:08
Custom Web Fonts and the Rails Asset Pipeline

Web fonts are pretty much all the rage. Using a CDN for font libraries, like TypeKit or Google Fonts, will be a great solution for many projects. For others, this is not an option. Especially when you are creating a custom icon library for your project.

Rails and the asset pipeline are great tools, but Rails has yet to get caught up in the custom web font craze.

As with all things Rails, there is more then one way to skin this cat. There is the recommended way, and then there are the other ways.

The recommended way

Here I will show how to update your Rails project so that you can use the asset pipeline appropriately and resource your files using the common Rails convention.

@jimweirich
jimweirich / abstract.md
Created April 17, 2012 23:53
Berlin Clock Kata

Berlin Clock

Original Reference

Create a representation of the Berlin Clock for a given time (hh::mm:ss).

The Berlin Uhr (Clock) is a rather strange way to show the time. On the top of the clock there is a yellow lamp that blinks on/off every two seconds. The time is calculated by adding rectangular lamps.

@dupuy
dupuy / README.rst
Last active June 3, 2024 23:01
Common markup for Markdown and reStructuredText

Markdown and reStructuredText

GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.