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\Facades\View; | |
View::macro('renderFragment', function ($view, $fragment, array $data = []) { | |
$path = View::make($view, $data)->getPath(); | |
$content = File::get($path); | |
$re = sprintf('/@section\("%s"\)(.*)@show/ms', $fragment); |
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
function getViewTextDomain($path) | |
{ | |
$config = wire('config'); | |
$input = str_replace('.', '-', | |
str_replace($config->paths->root, '', $path) | |
); | |
$re = '/\/+/m'; |
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 | |
class RecapCommand extends Command | |
{ | |
public function handle() | |
{ | |
$this->recapCommand(); | |
if (! $this->confirm('Do you wish to continue?')) | |
{ |
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
Show hidden characters
{ | |
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme", | |
"draw_white_space": "all", | |
"highlight_line": true, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"save_on_focus_lost": true, | |
"theme": "Material-Theme.sublime-theme", |
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
set formats=*.mp3 | |
set presets=-vn -ar 44100 -ac 2 -ab 192k -f mp3 -map_metadata 0 -id3v2_version 3 | |
set outputext=mp3 | |
# iterate through files and save in a 'reencoded' folder | |
for %%g in (%formats%) do start /b /wait "" "ffmpeg.exe" -i "%~dp0%%g" %presets% "reencoded/%%~ng.%outputext%" && TITLE "Converted: "%%g |
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
<nav id="site-navigation" aria-label="Menu" class="dn-l bg-maillis"> | |
<ul id="main-menu" class="dn list pa0"> | |
@if (auth()->check()) | |
<li class="bb bw1 b--maillis-orange pv2 pl4"><span class="f6 white b">{{ auth()->user()->email }}</span></li> | |
<li><a class="f6 link white dib dim pv2 pl4" href="{{ route("auth.profile") }}">{{ trans("public.profile") }}</a></li> | |
<li><a class="f6 link white dib dim pv2 pl4" href="{{ route("auth.logout") }}">{{ trans("public.logout") }}</a></li> | |
@else | |
<li><a class="f6 link white dib dim pv2 pl4" href="{{ route("auth.login") }}">{{ trans("public.login") }}</a></li> | |
@endif | |
<li><a class="f6 link white dib dim pv2 pl4" href="{{ route("auth.register") }}">{{ trans("public.contact") }}</a></li> |
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 | |
class ContactForm | |
{ | |
var $form; | |
var $to = 'destination@email.com'; | |
var $toName = 'Destination Name'; | |
public function __construct() |
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
[ | |
"2 A.M.", | |
"2 Minutes to Midnight", | |
"22 Acacia Avenue", | |
"Aces High", | |
"Afraid to Shoot Strangers", | |
"The Aftermath", | |
"Age of Innocence", | |
"The Alchemist", | |
"Alexander the Great", |
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
protected function ___initTwig(Twig_Environment $twig) | |
{ | |
$function = new Twig_SimpleFunction("__", function ($text, $filename = '', $context = '') use ($twig) { | |
if (!empty($filename)) { | |
if ($twig->getLoader()->exists($filename . '.twig')) { | |
$textdomain = $twig->getLoader()->getCacheKey($filename . '.twig'); | |
$language = $this->user->language; | |
$out = htmlspecialchars($language->translator()->getTranslation($textdomain, $text, $context), ENT_QUOTES, 'UTF-8'); | |
} else { | |
$out = $text; |