Skip to content

Instantly share code, notes, and snippets.

@AlexVanderbist
AlexVanderbist / fn-live-template-phpstorm.xml
Created July 22, 2020 13:58
PhpStorm arrow function live template
<template name="fn" value="fn ($TYPE$ $INSTANCE$) =&gt; $INSTANCE$$END$" description="Arrow function" toReformat="false" toShortenFQNames="true">
<variable name="TYPE" expression="completeSmart()" defaultValue="" alwaysStopAt="true" />
<variable name="INSTANCE" expression="concat(&quot;$&quot;, camelCase(TYPE))" defaultValue="" alwaysStopAt="false" />
<context>
<option name="PHP Expression" value="true" />
<option name="PHP Statement" value="true" />
</context>
</template>
@fesor
fesor / README.md
Last active November 3, 2023 06:50
What is OOP

Что такое ООП

Ссылки на материалы, позволяющее лучше понять оригинальную идею.

Quotes

Java and C++ make you think that the new ideas are like the old ones. Java is the most distressing thing to hit computing since MS-DOS.

Alan Kay

@qoomon
qoomon / conventional_commit_messages.md
Last active May 24, 2024 06:59
Conventional Commit Messages

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs

Commit Message Formats

Default

@fesor
fesor / ContainerReturnTypePlugin.php
Last active July 28, 2022 13:50
Phan plugins for Symfony and Doctrine
<?php
use Phan\CodeBase;
use Phan\Language\Context;
use Phan\Language\UnionType;
use Phan\PluginV2\ReturnTypeOverrideCapability;
use Phan\Language\Element\Method;
use Phan\PluginV2;
use \Phan\Language\FQSEN\FullyQualifiedClassName;
use Phan\Language\Element\Clazz;
@brendanzab
brendanzab / reactive_systems_bibliography.md
Last active October 10, 2022 06:36
A reading list that I'm collecting while building my Rust ES+CQRS framework: https://github.com/brendanzab/chronicle

Functional, Reactive, and Distributed Systems Bibliography

Books

@vkostyukov
vkostyukov / statuses.md
Last active February 13, 2024 21:39
HTTP status codes used by world-famous APIs
API Status Codes
[Twitter][tw] 200, 304, 400, 401, 403, 404, 406, 410, 420, 422, 429, 500, 502, 503, 504
[Stripe][stripe] 200, 400, 401, 402, 404, 429, 500, 502, 503, 504
[Github][gh] 200, 400, 422, 301, 302, 304, 307, 401, 403
[Pagerduty][pd] 200, 201, 204, 400, 401, 403, 404, 408, 500
[NewRelic Plugins][nr] 200, 400, 403, 404, 405, 413, 500, 502, 503, 503
[Etsy][etsy] 200, 201, 400, 403, 404, 500, 503
[Dropbox][db] 200, 400, 401, 403, 404, 405, 429, 503, 507
@IcyMidnight
IcyMidnight / MySQL functions to convert between binary and string uuids
Created July 31, 2009 09:27
MySQL functions to convert between binary and string uuids
DELIMITER |
CREATE FUNCTION uuid_from_bin(b BINARY(16))
RETURNS CHAR(36) DETERMINISTIC
BEGIN
DECLARE hex CHAR(32);
SET hex = HEX(b);
RETURN CONCAT(LEFT(hex, 8), '-', MID(hex, 9,4), '-', MID(hex, 13,4), '-', MID(hex, 17,4), '-', RIGHT(hex, 12));
END
|