Skip to content

Instantly share code, notes, and snippets.

View BrandonSurowiec's full-sized avatar

Brandon Surowiec BrandonSurowiec

  • Flint, MI
View GitHub Profile
@BrandonSurowiec
BrandonSurowiec / .php-cs-fixer.dist.php
Created June 23, 2022 13:05 — forked from claudiodekker/.php-cs-fixer.dist.php
Personal pre-Pint .php-cs-fixer.dist.php file
<?php
$finder = Symfony\Component\Finder\Finder::create()
->notPath('bootstrap')
->notPath('node_modules')
->notPath('storage')
->notPath('vendor')
->in(__DIR__)
->name('*.php')
->notName('*.blade.php');
@BrandonSurowiec
BrandonSurowiec / keybase.md
Created February 27, 2018 18:08
keybase.md

Keybase proof

I hereby claim:

  • I am brandonsurowiec on github.
  • I am brandonsurowiec (https://keybase.io/brandonsurowiec) on keybase.
  • I have a public key ASBx2mxBXrfAdqAUA1XtB6tdlE_O98XEGsMbbBlUxa_BQQo

To claim this, I am signing this object:

@BrandonSurowiec
BrandonSurowiec / stream_file.php
Created August 7, 2017 14:53 — forked from fideloper/stream_file.php
Stream file from S3 to browser, assume Laravel Filesystem usage
<?php
/*************************************************************************
* Get File Information
*/
// Assuming these come from some data source in your app
$s3FileKey = 's3/key/path/to/file.ext';
$fileName = 'file.ext';
@BrandonSurowiec
BrandonSurowiec / countries.php
Created November 26, 2016 19:49 — forked from ericlbarnes/countries.php
PHP Array of country names
<?php
return [
"Afghanistan",
"Albania",
"Algeria",
"Andorra",
"Angola",
"Antigua and Barbuda",
"Argentina",
@BrandonSurowiec
BrandonSurowiec / Contract Killer 3.md
Last active September 1, 2015 19:42 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

@BrandonSurowiec
BrandonSurowiec / sublime-text-php-this-arrow-autocomplete.md
Last active July 5, 2016 02:09
SublimeText: Autocompletion of $this-> and $this;

Add to Preferences > Key Bindings - User:

Auto replace to $this-> after typing $-

  // Auto replace to $this-> after typing $-
    { "keys": ["-"], "command": "insert_snippet", "args": {"contents": "this->"}, "context":
        [
            { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
            { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
            { "key": "preceding_text", "operator": "regex_contains", "operand": "\\$$", "match_all": true },