Tired of typing composer selfupdate
, composer install
... ?
Good news, I just noticed you can omit most of the characters, it works as well.
You can cut down up to composer sel
, composer ins
...
/* | |
cleaner than hard-coding the desired font size | |
refs: http://api.jquery.com/css/ | |
some use case: | |
all these websites that use *huge* font sizes, | |
painful to read even on a 1920x1080 screen. | |
*/ | |
$('.article-content').css('font-size', '-=2'); |
Tired of typing composer selfupdate
, composer install
... ?
Good news, I just noticed you can omit most of the characters, it works as well.
You can cut down up to composer sel
, composer ins
...
<?php | |
trait OrderByRandomTrait | |
{ | |
/** | |
* Scope to order by random. | |
* | |
* @param \Illuminate\Database\Query\Builder $query | |
* @return \Illuminate\Database\Query\Builder | |
*/ |
<?php | |
/** | |
* Convert from Mozilla's LZ4 format to LZ4 v1.3 | |
* | |
* @link https://searchfox.org/mozilla-central/source/toolkit/components/lz4/lz4.js | |
* @link https://lz4.software.informer.com/1.3/ | |
* | |
* @param string $input File content in Mozilla's LZ4 format | |
* @return string File content converted to LZ4 v1.3 |
; www.autohotkey.com/board/topic/36239-spotify-global-hotkeys/ | |
; #Win !Alt ^Ctrl +Shift | |
#NoEnv | |
#SingleInstance force | |
DetectHiddenWindows, On | |
IfWinNotExist, ahk_class SpotifyMainWindow | |
Run, %A_AppData%\Spotify\spotify.exe, %A_AppData%\Spotify |
<?php | |
// github.com/laravel/framework/issues/5223 | |
// github.com/laravel/framework/pull/5435 | |
use Illuminate\Database\Query\Builder; | |
Builder::macro('orderByRandom', function () { | |
$randomFunctions = [ |
<?php | |
use Illuminate\Support\Str; | |
Str::macro('replaceFirst', function ($search, $replace, $subject) { | |
$position = strpos($subject, $search); | |
if ($position !== false) { |
<?php | |
// we'll do nasty things to this instance | |
$instance = new Foo; | |
// pass instance or class name | |
$method = new ReflectionMethod($instance, 'privateMethod'); | |
$method = new ReflectionMethod('Foo', 'privateMethod'); | |
// milkshakes to the yard |
<?php | |
namespace App; | |
class Article extends \Illuminate\Database\Eloquent\Model | |
{ | |
protected function getAttributeFromArray($key) | |
{ | |
global $BENCHMARK_1; |
<?php | |
// logs in one dir per month, one file per day | |
// storage/logs/YYYY-MM/YYYY-MM-DD.log | |
// paste in bootstrap/app.php, after $app assignation | |
// reference: https://laravel.com/docs/5.4/errors#custom-monolog-configuration | |
$app->configureMonologUsing(function () { |