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
<template> | |
<transition name="modal" v-if="toggled"> | |
<div class="fixed z-50 pin-t pin-l w-full h-screen bg-grey overflow-y-scroll flex" style="background-color: rgba(0, 0, 0, .5);"> | |
<div class="p-3 m-auto" :class="{'w-full': width!='auto'}"> | |
<div id="modalBox" class="md:mx-auto p-4 md:p-8 bg-white border rounded border-grey-darkest shadow-lg" :class="{'w-full md:w-1/3':width === 'small', 'w-full md:w-5/6': width === 'large', 'inline-block': width === 'auto'}"> | |
<div class="modal-header flex justify-center mb-2 text-center "> | |
<slot name="header"></slot> | |
</div> |
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
// Place your key bindings in this file to overwrite the defaults | |
[ | |
{ | |
"key": "cmd+enter", | |
"command": "editor.action.showContextMenu", | |
"when": "editorTextFocus" | |
}, | |
{ | |
"key": "shift+g", | |
"command": "workbench.view.scm" |
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 phpBBValetDriver extends ValetDriver | |
{ | |
/** | |
* Determine if the driver serves the request. | |
* | |
* @param string $sitePath | |
* @param string $siteName | |
* @param string $uri |
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 vbulletinValetDriver extends ValetDriver | |
{ | |
/** | |
* Determine if the driver serves the request. | |
* | |
* @param string $sitePath | |
* @param string $siteName | |
* @param string $uri |
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 | |
// .... | |
public function boot() | |
{ | |
Blade::directive('mix', function ($path) { | |
if(! app()->environment('production')) { | |
return "<?=e(mix({$path}))?>"; | |
} |
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
tell application "System Events" | |
tell process "Code" | |
repeat while window 2 exists | |
click button 1 of window 2 | |
end repeat | |
end tell | |
end tell |
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
Vue.mixin({ methods: { | |
optional(variable) { | |
return new Proxy(typeof variable === undefined || variable === null ? {} : variable, { | |
get(target, prop) { return prop in target ? target[prop] : null; } | |
}); | |
}, | |
}}) | |
//usage: {{ optional(user).email }} |
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; | |
use Illuminate\Support\Arr; | |
use Illuminate\Support\Collection; | |
use Illuminate\Support\Str; | |
use Illuminate\Support\Facades\File; | |
use SplFileInfo; |
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
# Get files from a range of commits from a different branch | |
# and merge them into your current branch | |
# | |
# Imagine you are in `feature` branch, and you want | |
# get files [between range of commits] from `master` and merge them | |
# into `feature` branch. | |
$ git checkout master -- $(git diff --name-only SHA1 SHA1 --diff-filter=ACMRTUXB) |
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 | |
volume=$(pacmd list-sinks|grep -A 15 '* index'| awk '/volume: front/{ print $5 }' | sed 's/[%|,]//g') | |
command=$1; | |
percentage=$(( 160*20/100 )) |