Create new migration script:
php artisan make:migration add_api_token --table=users
... | |
'channels' => [ | |
'stack' => [ | |
'driver' => 'stack', | |
'channels' => ['single'], | |
], | |
'single' => [ | |
'driver' => 'monolog', | |
'path' => storage_path('logs/laravel.log'), |
#!/usr/bin/env bash | |
# Disable Face Detect in Photos app | |
defaults write com.apple.iPhoto PKFaceDetectionEnabled 0 | |
defaults write com.apple.gamed Disabled -bool true | |
defaults write com.apple.NetworkBrowser DisableAirDrop -bool YES # log out, log in | |
import { nextTick } from 'vue' | |
export const useProperCookie = () => useCookie('proper_token') | |
export const useAuthFetch = (url, fetchOptions = {}) => { | |
return $fetch(url, { | |
baseURL: 'https://l9.test/api/v1', | |
...fetchOptions, | |
headers: { | |
Authorization: `Bearer ${useProperCookie().value}`, | |
...fetchOptions.headers, |
// 1. Open the browser developper console on the network tab | |
// 2. Start the video | |
// 3. In the dev tab, locate the load of the "master.json" file, copy its full URL | |
// 4. Run: node vimeo-downloader.js "<URL>" | |
// (done automatically now) 5. Combine the m4v and m4a files with mkvmerge | |
const fs = require('fs'); | |
const url = require('url'); | |
const https = require('https'); | |
const { exec } = require('child_process'); |
<?php | |
namespace Valet; | |
use function Valet\info; | |
use function Valet\warning; | |
// Put this file in your ~/config/.valet/Extensions directory! | |
/** |
/* To Title Case © 2018 David Gouch | https://github.com/gouch/to-title-case */ | |
// eslint-disable-next-line no-extend-native | |
String.prototype.toTitleCase = function () { | |
'use strict' | |
var smallWords = /^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|v.?|vs.?|via)$/i | |
var alphanumericPattern = /([A-Za-z0-9\u00C0-\u00FF])/ | |
var wordSeparators = /([ :–—-])/ | |
return this.split(wordSeparators) |
#!/usr/bin/ruby | |
require "selenium-webdriver" | |
require 'pp' | |
# install : | |
# sudo apt-get install ruby ruby-dev chromium-chromedriver firefoxdriver | |
# sudo gem install selenium-webdriver | |
# sudo ln -s /usr/lib/chromium-browser/chromedriver /usr/local/bin/ |
<?php | |
/** | |
* Created by IntelliJ IDEA. | |
* User: bill | |
* Date: 2018/11/06 | |
* Time: 13:24 | |
*/ | |
use InvalidArgumentException; |
<?php | |
// Register these inside a service provider: | |
Blade::directive('route', function ($expression) { | |
return "<?php echo route({$expression}) ?>"; | |
}); | |
Blade::directive('routeIs', function ($expression) { | |
return "<?php if (request()->routeIs({$expression})) : ?>"; |