This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
namespace App\Services; | |
// Based on https://github.com/BluePsyduck/symfony-process-manager/tree/master | |
use App\Services\Interfaces\ProcessManagerInterface; | |
use Closure; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
namespace App\Services; | |
use DateTime; | |
use Psr\Log\AbstractLogger; | |
use Psr\Log\LogLevel; | |
use RuntimeException; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker volume create --driver local -o o=bind -o type=none -o device="$YOUR_DIRECTORY" $VOLUME_NAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//////////////// | |
module My\Stuff\MyModule; // implies “namespace My\Stuff\MyModule” | |
export class Foo { } | |
export function foo() { } | |
function bar() { } // not exported | |
export string $message = “your ad here”; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#NoEnv ; recommended for performance and compatibility with future | |
autohotkey releases. | |
#UseHook | |
#InstallKeybdHook | |
#SingleInstance force | |
SendMode Input |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"\e[A": history-search-backward | |
"\e[B": history-search-forward | |
set show-all-if-ambiguous on | |
set completion-ignore-case on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.4' | |
services: | |
caddy: | |
image: caddy:2 | |
restart: "unless-stopped" | |
ports: | |
- "80:80" | |
- "443:443" | |
volumes: | |
- .docker/caddy/Caddyfile:/etc/caddy/Caddyfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//// Exact types | |
type Exact<TExpected, TActual extends TExpected> = TExpected extends TActual ? TExpected: never; | |
type Foo = { x: number }; | |
function acceptT<T extends Foo>(input: Exact<Foo, T>) {} | |
//// JSON Schema Type | |
type JSONSchema<T> = T extends number | |
? { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Maybe<a> = { val: a, tag = "some" } | { tag: "none" } | |
function isSome<A, Ma: Maybe<a>>(m: Ma): Ma["val"] is A { | |
return m.tag == "some"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ -z $1 ]; then | |
stamp=$(mktemp /tmp/stamp.XXXXXXXX) | |
trap 'rm $stamp' EXIT | |
emacs $HOME/bin | |
find $HOME/bin/ -type f -cnewer $stamp | xargs -r chmod +x | |
exit 0 | |
fi |
NewerOlder