Skip to content

Instantly share code, notes, and snippets.

View vertisan's full-sized avatar
🛠️
Something to do ..

Pawel Farys vertisan

🛠️
Something to do ..
View GitHub Profile
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"enable": true,
@vertisan
vertisan / keybase.md
Created March 17, 2024 18:05
keybase.md

Keybase proof

I hereby claim:

  • I am vertisan on github.
  • I am vertisan (https://keybase.io/vertisan) on keybase.
  • I have a public key whose fingerprint is 547C 688E F2BC 5035 A597 0B09 645D E7B9 D003 69CE

To claim this, I am signing this object:

<?php
declare(strict_types=1);
namespace App\Service\RemoteServer;
use League\Flysystem\FileExistsException;
use League\Flysystem\FileNotFoundException;
use League\Flysystem\FilesystemInterface;
abstract class RemoteServerAbstract implements RemoteServerInterface
{
<?php
class FoobarData
{
private $name;
/**
* Create DTO, optionally extracting data from a model.
*
* @param Foobar|null $foobar
@vertisan
vertisan / SteamUserFunctions.php
Last active December 3, 2017 10:46 — forked from rannmann/SteamUserFunctions.php
Convert Steam IDs to and from Community IDs and User IDs
<?php
/* Examples
toSteamID(25490879) // STEAM_0:1:12745439
toSteamID(76561197985756607) // STEAM_0:1:12745439
toSteamID("STEAM_0:1:12745439") // STEAM_0:1:12745439
toUserID(25490879) // 25490879
toUserID(76561197985756607) // 25490879
toUserID("STEAM_0:1:12745439") // 25490879
@vertisan
vertisan / phpcs.xml
Last active November 2, 2017 08:42
[PHPCS] Laravel Sniffer Config
<?xml version="1.0"?>
<ruleset name="Laravel Development">
<description>Laravel Development by Vertisan</description>
<file>app</file>
<file>config</file>
<file>public</file>
<file>resources</file>
<file>routes</file>
@vertisan
vertisan / pre-commit
Created November 2, 2017 08:30
PHPCS & Lint before commit
#!/bin/sh
PROJECT=`php -r "echo dirname(dirname(dirname(realpath('$0'))));"`
STAGED_FILES_CMD=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep \\\\.php`
if [ "$#" -eq 1 ]
then
oIFS=$IFS
IFS='
'
@vertisan
vertisan / .htaccess
Created October 11, 2017 12:11
.htaccess SSL
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]
@vertisan
vertisan / laravel-model_connection.sublime-snippet
Last active August 22, 2017 13:04
Sublime Text 3 - Laravel Snippets (used PHP 7.1!)
<!-- Laravel Model - Custom connection -->
<snippet>
<content><![CDATA[
/**
* Connection type for model
* @var string
*/
protected \$connection = '${1:name_of_connection}';
]]></content>
<tabTrigger>laravel:connection</tabTrigger>