Skip to content

Instantly share code, notes, and snippets.

@jszobody
jszobody / styles.css
Last active April 26, 2020 18:09
Helpscout Docs Styles
body {
font-size: 16px;
font-family: Avenir;
}
<?php
namespace App\Services;
use App\Models\ZipFile;
use Illuminate\Support\Collection;
use ZipStream\Exception\FileNotFoundException;
use ZipStream\ZipStream as ZipStreamBase;
class ZipStream extends ZipStreamBase
{
@jszobody
jszobody / ShortClassNames.php
Last active July 14, 2017 16:50
Short class names with preferred namespaces
<?php
namespace App\Console;
use Illuminate\Support\Collection;
/**
* Taken from https://github.com/spatie/laravel-tinker-tools. Made to work with PHP 5.6, and have preferred namespaces.
*/
class ShortClassNames
@jszobody
jszobody / Undies.php
Last active February 12, 2022 15:59
Get/set any class private property
<?php
/**
* Access/modify any instance private property.
*/
class Undies {
protected $instance;
protected $setter;
protected $getter;
<?php
function __autoload($class_name) {
$path = str_replace("\\","/",$class_name);
include "lib/" . $path . '.php';
}
$i = 0;
$path = false;
//file_put_contents("server.log",""); // I want a clean log file for this run