Skip to content

Instantly share code, notes, and snippets.

View kefzce's full-sized avatar
🏠
Working from home

kefzce

🏠
Working from home
View GitHub Profile
@kefzce
kefzce / macOS Internals.md
Created May 8, 2023 21:06 — forked from kconner/macOS Internals.md
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@kefzce
kefzce / MyRepository.php
Created April 26, 2023 16:58 — forked from bulton-fr/MyRepository.php
Doctrine yield
<?php
namespace MyBundle\Repository;
use Doctrine\ORM\EntityRepository;
use MyBundle\Doctrine\RepositoryTrait;
class MyRepository extends EntityRepository
{
use RepositoryTrait;
@kefzce
kefzce / dnsmasq_setup_osx.md
Created December 4, 2022 23:54 — forked from eloypnd/dnsmasq_setup_osx.md
wildcard DNS record on OS X in localhost development with dnsmasq

wildcard DNS in localhost development

$ brew install dnsmasq
   ...
$ cp /usr/local/opt/dnsmasq/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf
  • edit /usr/local/etc/dnsmasq.conf
address=/local/127.0.0.1
@kefzce
kefzce / Pool.php
Created January 13, 2021 20:16 — forked from SerafimArts/Pool.php
<?php
declare(strict_types=1);
class Pool
{
/**
* @var \Generator[]|array[]
*/
private $iterators = [];
@kefzce
kefzce / async_await_best_practices_cheatsheet.md
Created January 9, 2020 12:30 — forked from jonlabelle/async_await_best_practices_cheatsheet.md
C# Asynchronous Programming Guideline Cheat Sheet

Async Await Best Practices Cheat Sheet

Summary of Asynchronous Programming Guidelines

Name Description Exceptions
Avoid async void Prefer async Task methods over async void methods Event handlers
Async all the way Don't mix blocking and async code Console main method
Configure context Use ConfigureAwait(false) when you can Methods that require con­text
@kefzce
kefzce / statuses.md
Created November 11, 2019 11:22 — forked from vkostyukov/statuses.md
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
@kefzce
kefzce / statuses.md
Created November 11, 2019 11:22 — forked from vkostyukov/statuses.md
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
@kefzce
kefzce / README.md
Created November 13, 2018 00:59 — forked from kandran/README.md
Use php-cs-fixer with phpstorm file watcher

Auto use php-cs-fixer at save with PHPStorm and file watcher

  1. Open settings ( ctrl + alt + s)
  2. Menu file watchers
  3. Import watchers.xml
  4. Change settings like path for php and php-cs-fixer
  5. Enjoy ! PSRize at save.

NB: File watchers are linked to a specific project, so we have to re-import them for each project. External tools have IDE scope but we couldn't run them automaticaly - we could set a key bind.

@kefzce
kefzce / states_hash.json
Created September 26, 2018 11:28 — forked from mshafrir/states_hash.json
US states in JSON form
{
"AL": "Alabama",
"AK": "Alaska",
"AS": "American Samoa",
"AZ": "Arizona",
"AR": "Arkansas",
"CA": "California",
"CO": "Colorado",
"CT": "Connecticut",
"DE": "Delaware",