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
<!-- leyouts/app.blade.php --> | |
@if (View::hasSection('breadcrumb')) | |
@yield('breadcrumb') | |
@else | |
@yield('title', 'Dashboard') | |
@endif | |
<!-- files/create.blade.php --> | |
@extends('layouts.app') |
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
jQuery.fn.selectText = function () { | |
this.find('input').each(function () { | |
if ($(this).prev().length == 0 || !$(this).prev().hasClass('p_copy')) { | |
$('<p class="p_copy" style="position: absolute; z-index: -1;"></p>').insertBefore($(this)); | |
} | |
$(this).prev().html($(this).val()); | |
}); | |
var doc = document; | |
var element = this[0]; | |
console.log(this, element); |
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\Providers; | |
use Illuminate\Http\JsonResponse; | |
use Illuminate\Support\Collection; | |
use Illuminate\Support\Facades\Response; | |
use Illuminate\Support\ServiceProvider; | |
class ResponseMacroServiceProvider extends ServiceProvider |
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
#!/usr/bin/env python | |
# coding: utf-8 | |
# Copyright 2017, Nigel Small | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
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\Console\Commands; | |
use Illuminate\Console\Command; | |
class Example extends Command | |
{ | |
/** | |
* The name and signature of the console command. |
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; | |
use Illuminate\Notifications\Notifiable; | |
use Illuminate\Foundation\Auth\User as Authenticatable; | |
class User extends Authenticatable | |
{ | |
use Notifiable; |
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
#!/bin/bash | |
echo "Testing sudo..." | |
sudo true | |
if [ $? -ne 0 ] | |
then | |
echo "ERROR: You must be able to sudo to run this script."; | |
exit 1; | |
fi; |
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
#!/usr/bin/env php | |
<?php | |
function crow($dir = __DIR__) | |
{ | |
$items = scandir($dir); | |
foreach ($items as $item) { | |
if (! preg_match('/^\.{1,2}$/', $item)) { | |
$path = $dir.DIRECTORY_SEPARATOR.$item; |
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
for (var i = 0, l; ; = log[i]; ++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 | |
namespace App; | |
use Finagin\Support\Singleton; | |
class Instance extends Singleton | |
{ | |
protected function __construct() | |
{ |