This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (! function_exists('take')) { | |
/** | |
* Run functions consecutively by piping through the result of one | |
* into the next. | |
* | |
* @param mixed $value A value | |
* | |
* @return object | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
|-------------------------------------------------------------------------- | |
| Laravel 5 - URL Query String Helper | |
|-------------------------------------------------------------------------- | |
| | |
| A helper function to take a URL string then quickly and easily add query | |
| string parameters to it, or change existing ones. | |
| | |
| url_queries(['order' => 'desc', 'page' => 2], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Register a new wildcard route that returns a view if it exists. | |
* | |
* @param string $path | |
* @param string $viewDirectory | |
* @param array $data | |
* @return \Illuminate\Routing\Route | |
*/ | |
\Route::macro('viewDir', function ($path, $viewDirectory = null, $data = []) { | |
$pathWithSegments = trim($path, '/') . '/{page?}'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
command_strings = { | |
'php artisan make="hi mate" heh "I have a value"', | |
"php artisan make:auth", | |
[[I "am" 'the text' and "some more text with '" and "escaped \" text"]], | |
[[1 2 word 2 9 'more words' 1 "and more" "1 2 34"]], | |
[[omo "This is a string!" size=14 font="Comic Sans" break= hmm "thing and 'thing'" ]] | |
} | |
function command_parse(s) | |
local t={} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
|-------------------------------------------------------------------------- | |
| Spacing | |
|-------------------------------------------------------------------------- | |
| | |
| Utilities for controlling an element's padding and margin. | |
| | |
*/ | |
$spacing-class: ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Additional spin to the animation. | |
.hamburger { | |
display: inline-block; | |
width: 1.5em; | |
height: 1.5em; | |
padding-top: 0.3em; | |
padding-bottom: 0.3em; | |
vertical-align: middle; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
|-------------------------------------------------------------------------- | |
| Laravel 5, Bootstrap 4 Pagination | |
|-------------------------------------------------------------------------- | |
| | |
| A partial view to handle pagination for collections in Laravel's query | |
| builder or Eloquent ORM, styled with Bootstrap 4. | |
| | |
| The pagination displays like the following, where * denotes the current |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
|-------------------------------------------------------------------------- | |
| Spacing | |
|-------------------------------------------------------------------------- | |
| | |
| Utilities for controlling an element's padding and margin. | |
| | |
*/ | |
$spacing-class: ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (! function_exists('catch_exit')) { | |
/** | |
* Catch when a part of a script exits and execute a custom function at | |
* that point. Note that if exiting, the script does not continue. | |
* You can use this to, for example, flash a message and | |
* redirect the user instead of showing the default | |
* black text on white background "exit" view. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define('PIPE_VALUE', '__pipe-' . uniqid()); | |
class Pipe implements ArrayAccess, Iterator, Serializable | |
{ | |
public $value; | |
private $position = 0; | |
public function __construct($value) |