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
#ifndef _WIN32_WINNT | |
# define _WIN32_WINNT 0x500 | |
#endif | |
#include "Winuser.h" | |
class ofxMouse | |
{ | |
public: | |
static enum MouseEventFlags | |
{ |
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
@echo off | |
FOR /F "tokens=*" %%G IN ('dir /b *.m4a') DO ffmpeg -i "%%G" -acodec libmp3lame -ab 128k "%%G.mp3" |
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
/** Using MutationObserver **/ | |
/*****************************/ | |
/** | |
* Continually searches for an element (by selector) in the DOM and returns it if found. | |
* | |
* @param selector<string> A selector string use to search for the element | |
* @returns {Promise<any>} | |
*/ | |
function existsInDOM(selector) { |
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
alias cbf='./vendor/bin/phpcbf' | |
alias cdal='composer dumpautoload' |
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 | |
// This can be found in the Symfony\Component\HttpFoundation\Response class | |
const HTTP_CONTINUE = 100; | |
const HTTP_SWITCHING_PROTOCOLS = 101; | |
const HTTP_PROCESSING = 102; // RFC2518 | |
const HTTP_OK = 200; | |
const HTTP_CREATED = 201; | |
const HTTP_ACCEPTED = 202; |
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
/** | |
* Usage: new \App\Rules\MultipleEmails | |
*/ | |
<?php | |
namespace App\Rules; | |
use Illuminate\Contracts\Validation\Rule; | |
use Validator; |
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
Collection::macro('zipReverse', function() { | |
$items = $this->map->values(); | |
$maxElementCount = ($items->map->count())->max(); | |
$zipped = collect(); | |
for($i = 0; $i < $maxElementCount; $i++) { | |
/** @var Collection $columnItems */ | |
$columnItems = $items->pluck($i); |
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 | |
declare(strict_types=1); | |
namespace OsiemSiedem\View; | |
use ArrayAccess; | |
use JsonSerializable; | |
use ReflectionMethod; | |
use ReflectionObject; |
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
public function viewItem(Item $item) | |
{ | |
$data['product'] = \App\Presenters\VuePresenters\ItemPresenter::decorate($product); | |
return view('item', $data); | |
} | |
// https://laravel-news.com/laravel-view-models | |
// https://github.com/spatie/laravel-view-models |
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
Validator::extend('alpha_spaces', function ($attribute, $value){ | |
return preg_match('/^[\pL\s]+$/u', $value); | |
}); |
NewerOlder