This file contains hidden or 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\Routing\Route; | |
use Illuminate\Foundation\Console\RouteListCommand; | |
class RouteTable extends RouteListCommand | |
{ | |
/** | |
* {@inheritdoc} |
This file contains hidden or 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 | |
// create a route like this | |
$this->route->get('projects/{id}', 'ProjectsController@show'); | |
// Put this in your provider | |
// It will check if it can decode, else it will just return what was put in the url | |
$this->route->bind('id', function ($id) { | |
return (new Hashids())->decode($id)[0] ?? $id; |
This file contains hidden or 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
import Vue from 'vue'; | |
import store from './store'; | |
// Load root component | |
if(elementIsFound("application")) { | |
new Vue({ | |
store, | |
name: 'Your application', | |
components: { | |
pages: require('./components/pages') |
This file contains hidden or 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
dirsize () { | |
du -shx * .[a-zA-Z0-9_]* 2> /dev/null | \ | |
egrep '^ *[0-9.]*[MG]' | sort -n > /tmp/list | |
egrep '^ *[0-9.]*M' /tmp/list | |
egrep '^ *[0-9.]*G' /tmp/list | |
rm -rf /tmp/list | |
} |
This file contains hidden or 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
INSERT into encrypted_data (encrypted) VALUES (AES_ENCRYPT('let us hide this stuff', 'secretkey')); | |
SELECT AES_DECRYPT(encrypted, 'secretkey') from encrypted_data WHERE AES_DECRYPT(encrypted, 'secretkey') LIKE '%hide%'; |
This file contains hidden or 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
@mixin aspect-ratio($width, $height) { | |
position: relative; | |
&:before{ | |
display: block; | |
content: " "; | |
width: 100%; | |
padding-top: ($height / $width) * 100%; | |
} | |
> .content { |
This file contains hidden or 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
import alertify from 'alertify.js'; | |
const Flasher = { | |
success(thing, action) { | |
alertify.logPosition("top right"); | |
alertify.success(`Het ${thing} is ${action}.`); | |
}, | |
This file contains hidden or 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
var Config = { /* How long the notification stays visible */ | |
default_timeout: 5000, | |
/* container for the notifications */ | |
container: document.createElement('div'), | |
/* container styles for notifications */ | |
container_styles: { | |
position: "fixed", | |
zIndex: 99999, | |
right: "12px", | |
top: "12px" |
This file contains hidden or 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
/** | |
* Donut Graph | |
*/ | |
var GraphMixin = require('./graph-mixin'); | |
var Donut = { | |
mixins: [GraphMixin], | |
ready: function (){ | |
this.create(); | |
}, | |
data: function() { |
This file contains hidden or 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
========================================================================== | |
______ | |
\ \. EVERYBODY POOPS BLOOD | |
|`\_____\ | |
|` | | DON'T BE A WUSS JUST REACH IN THERE | |
| | | AND WOLF IT DOWN LIKE A MAN | |
__-====-__ _| | | | |
(~< >~> \ | | LOOK THERE'S ONE THING I'VE LEARNED | |
!~~-====-~~/----`+----/ AND THAT'S ONCE YOUR FINGERPRINTS ARE |