Skip to content

Instantly share code, notes, and snippets.

View richartkeil's full-sized avatar

Richard Keil richartkeil

View GitHub Profile
@pokap
pokap / assertArraySimilar.php
Last active August 9, 2022 15:08
[PHPunit] assert two arrays are equal, but ignore orders
<?php
trait ArrayTestCaseTrait
{
/**
* Asserts that two associative arrays are similar.
*
* Both arrays must have the same indexes with identical values
* without respect to key ordering
*
@vasanthk
vasanthk / System Design.md
Last active May 13, 2024 20:43
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?
@jgrossi
jgrossi / Math.php
Created November 11, 2014 22:18
Math class from Taylor Otwell. Thanks to @brad (captain_jim1@yahoo.com) for the class content.
<?php
class Math {
/**
* The base.
*
* @var string
*/
private static $base = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';