Skip to content

Instantly share code, notes, and snippets.

@tplesnar
tplesnar / Localizable.strings
Last active September 25, 2023 14:56
French translation for PHPMon
/*
Strings.strings
PHP Monitor
Created by Nico Verbruggen on 16/05/2020.
Copyright © 2023 Nico Verbruggen. All rights reserved.
*/
// MENU ITEMS (MI)
@tplesnar
tplesnar / Throttler.php
Created February 10, 2023 10:58 — forked from DarkGhostHunter/Throttler.php
A class that throttles it's target methods calls.
<?php
namespace App\Throttler;
use Illuminate\Cache\RateLimiter;
class Throttler
{
/**
* Target to rate limit.
@tplesnar
tplesnar / .php-cs-fixer.dist.php
Created February 4, 2023 21:02
PHP cs fixer config
<?php
declare(strict_types=1);
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'@PHP74Migration' => true,
'@PHP74Migration:risky' => true,
Verifying that +thierryplesnar is my blockchain ID. https://onename.com/thierryplesnar
class Point
constructor: (@x = 0, @y = 0) ->
if isNaN(@x) or isNaN(@y)
throw new Error('Invalid coords')
add: (point) ->
@x += point.x
@y += point.y
subtract: (point) ->