Skip to content

Instantly share code, notes, and snippets.

View l-x's full-sized avatar
🏠
Working from home

Alexander Wühr l-x

🏠
Working from home
View GitHub Profile
@l-x
l-x / openpgp.md
Last active October 18, 2023 11:36

$argon2id$v=19$m=64,t=512,p=2$il5//ItlUIeU+AASoM33lA$AbROTQ4YAacS/ZH74/IkbQ

@l-x
l-x / cmux.sh
Created February 19, 2016 09:59
#!/bin/sh
CONF_DIR="$HOME/.cmux"
LAYOUT=tiled
CMD_FILE="$1"
SESSION_NAME=$(basename "$CMD_FILE")
if ! [ -e "$CMD_FILE" ]; then
CMD_FILE="$CONF_DIR/$CMD_FILE"
<?php
/**
* @link https://l-x.github.io/blog/2014/09/29/messing-around-with-phps-late-static-binding/
*/
class A {
public function createInstance() {
/**
* Calling method static even if
<?php
/**
* @link https://l-x.github.io/blog/2014/09/03/determine-the-type-of-a-php-array/
*
* @param array $array
*
* @return int
*/
function get_array_type(array $array) {
@l-x
l-x / call_user_func_struct.php
Last active December 28, 2015 23:49
Wrapper function hack for call_user_func_array which enables you to use keyword arguments on PHP functions and methods. It aims to be as close as possible to the behavior of call_user_func_array.
<?php
/**
* @link http://l-x.github.io/blog/2014/09/29/call-user-func-struct/
*
* @param callback $function
* @param array $param_struct
*
* @return mixed
*/