Skip to content

Instantly share code, notes, and snippets.

View WyriHaximus's full-sized avatar
🐉
Breathing Fire

Cees-Jan Kiewiet WyriHaximus

🐉
Breathing Fire
View GitHub Profile
@popovserhii
popovserhii / cli-config.php
Last active June 5, 2019 05:11
Integrating Doctrine 2 ORM and Migrations into Zend Expressive
<?php
/**
* config/cli-config.php
* For more details @see \DoctrineORMModule\Module
*
* Run next commands for Migrations work
* $ composer require doctrine/doctrine-orm-module
* $ composer require doctrine/migrations
*/
$container = require 'container.php';
@GLMeece
GLMeece / latency_numbers.md
Last active May 22, 2024 15:57
Latency Numbers Every Programmer Should Know - MarkDown Fork

Latency Comparison Numbers

Note: "Forked" from Latency Numbers Every Programmer Should Know

Event Nanoseconds Microseconds Milliseconds Comparison
L1 cache reference 0.5 - - -
Branch mispredict 5.0 - - -
L2 cache reference 7.0 - - 14x L1 cache
Mutex lock/unlock 25.0 - - -
@jd7h
jd7h / Top 10 talks at 33c3.md
Last active December 31, 2017 20:23
Top 10 talks at 33c3 according to Twitter
@dimitardanailov
dimitardanailov / .zshrc
Last active February 23, 2024 01:34
My personal zsh and tmux configurations
# Path to your oh-my-zsh installation.
export ZSH=/Users/dimitar.danailov/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
# ZSH_THEME="robbyrussell"
ZSH_THEME="agnoster"
#!/usr/bin/env bash
composer validate
### Previous version
# php -r "\$lock = json_decode(file_get_contents('composer.lock'))->hash; \$json = md5(file_get_contents('composer.json')); if (\$lock !== \$json) { echo \"Lock file out of date\\n\"; exit(1); } echo \"Lock file up to date\\n\"; exit(0);"
<?php
function random_exception()
{
foreach(get_declared_classes() as $class) {
$exceptions = [];
if (substr($class, -9) === 'Exception') {
$exceptions[] = $class;
}
$exception = $exceptions[array_rand($exceptions)];
@ericclemmons
ericclemmons / example.md
Last active April 24, 2024 18:09
HTML5 <details> in GitHub

Using <details> in GitHub

Suppose you're opening an issue and there's a lot noisey logs that may be useful.

Rather than wrecking readability, wrap it in a <details> tag!

<details>
 Summary Goes Here
@mitchellvanw
mitchellvanw / .zshrc
Last active May 7, 2016 22:42
Commit already...
ca () {
message=$(curl -s whatthecommit.com/index.txt)
git add .
git commit -a -m "$message";
}
@jeroenvdgulik
jeroenvdgulik / Talklist.md
Last active December 17, 2023 19:04
My mostly incomplete list of memorable talks that should probably be required material

The list is now hosted on a repository so you can PR -> https://github.com/jeroenvdgulik/awesome-talks/blob/master/README.md

The list