sudo apt-get remove redis-server -y
mkdir -p ~/repos
cd ~/repos
git clone https://github.com/antirez/redis
git checkout tags/3.2.0-rc3
make
sudo make install
sudo ./utils/install_server.sh
cd ../..
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 | |
//service provider boot method | |
public function boot() | |
{ | |
Route::macro('pages', function ($root = 'pages', $prefix = null) { | |
Route::get($prefix . '/{page?}', function ($path = 'home') use ($root) { | |
$path = str_replace('/', '.', $path); | |
$page = trim(sprintf("%s.%s", $root, $path), '.'); | |
if (!view()->exists($page)) { |
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 d-up() { | |
(CURRENT_UID=$(id -u):$(id -g) docker-compose up -d $*) | |
} | |
function d-run() { | |
(CURRENT_UID=$(id -u):$(id -g) docker-compose run --rm $*) | |
} | |
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
import qs from 'qs'; | |
/* | |
loadScript('https://example.com/script.js').then(() => { | |
// do something | |
}).catch(e => console.log(e)); | |
const loadjQuery = async () => { | |
try { | |
await loadscript('https://code.jquery.com/jquery-3.2.1.js'); |
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> | |
<div> | |
<label :for="name" :class="{ | |
'label-error': errors.has(name), | |
}">{{ label }}</label> | |
<div class="datepicker-selects"> | |
<select v-if="showDay" v-model="day" :class="{ | |
'input-error': !isValid('day') || errors.has(name), | |
}" :disabled="!isInitialised()"> | |
<option :value="null" disabled :selected="day === null">Day</option> |
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> | |
<div class="form-group"> | |
<label :for="name">Date of Birth</label> | |
<div class="form-inline"> | |
<input type="number" :id="name" min="1" step="1" :max="maxDay" size="2" class="form-control" v-model="day" placeholder="Day"> | |
<select class="form-control" v-model="month"> | |
<option value="-1" disabled>Month</option> | |
<option v-for="(month, index) in months" :value="index">{{ month }}</option> | |
</select> | |
<input type="number" :min="minYear" :max="maxYear" class="form-control" v-model="year"> |
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\Http\Middleware; | |
use DB; | |
class TransactionMiddleware | |
{ | |
public function ($request, $next) | |
{ |
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
storagedir="$(pwd)/storage/app/public" | |
publicdir="$(pwd)/public" | |
linkfile="${publicdir}/${*:-storage}"; | |
if [ -d $storagedir ] && [ -d $publicdir ]; then | |
if [ -L $linkfile ]; then | |
rm $linkfile; | |
fi | |
ln -s $storagedir $linkfile | |
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
Verifying that +willishq is my blockchain ID. https://onename.com/willishq |
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
class Listeners { | |
constructor() { | |
this.list = {}; | |
} | |
create(eventName, id, cb) { | |
if (!this.list[eventName]) { | |
this.list[eventName] = {}; | |
} |
NewerOlder