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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>media-controller-extension issue #14</title> | |
<style> | |
#container { | |
display: flex; | |
flex-wrap: wrap; |
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
:: Installers download page: | |
:: https://helpx.adobe.com/flash-player/kb/installation-problems-flash-player-windows.html#main-pars_text_4 | |
@ECHO. | |
@ECHO == CURRENT VERSIONS == | |
@REG QUERY HKLM\SOFTWARE\Macromedia\FlashPlayerActiveX /v Version | |
@REG QUERY HKLM\SOFTWARE\Macromedia\FlashPlayerPlugin /v Version | |
@REG QUERY HKLM\SOFTWARE\Macromedia\FlashPlayerPepper /v Version |
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 | |
// 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 () { |
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 | |
namespace App; | |
class Article extends \Illuminate\Database\Eloquent\Model | |
{ | |
protected function getAttributeFromArray($key) | |
{ | |
global $BENCHMARK_1; |
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 | |
// 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 |
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 | |
use Illuminate\Support\Str; | |
Str::macro('replaceFirst', function ($search, $replace, $subject) { | |
$position = strpos($subject, $search); | |
if ($position !== false) { |
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 | |
// github.com/laravel/framework/issues/5223 | |
// github.com/laravel/framework/pull/5435 | |
use Illuminate\Database\Query\Builder; | |
Builder::macro('orderByRandom', function () { | |
$randomFunctions = [ |
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
; 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 |
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 | |
/** | |
* 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 |
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 | |
trait OrderByRandomTrait | |
{ | |
/** | |
* Scope to order by random. | |
* | |
* @param \Illuminate\Database\Query\Builder $query | |
* @return \Illuminate\Database\Query\Builder | |
*/ |
NewerOlder