- Add
hooks
configuration into extra segment of composer.json:
"extra": {
"hooks": {
"pre-commit": [
"./vendor/bin/php-cs-fixer fix",
"git add -u"
{{ if seo_title == 'custom' }} | |
<title>{{ custom_title }}</title> | |
<meta name="twitter:title" content="{{ custom_title }}" /> | |
<meta property="og:title" content="{{ custom_title }}" /> | |
{{ else }} | |
<title>{{ title }} // {{ site:name }}</title> | |
<meta name="twitter:title" content="{{ title }}" /> | |
<meta property="og:title" content="{{ title }}" /> | |
{{ /if }} |
<template> | |
<div> | |
<label v-if="label" class="form-label" :for="`date-input-${_uid}`">{{ label }}:</label> | |
<input v-bind="$attrs" class="form-input" :id="`date-input-${_uid}`" :class="{ error: error }" type="text" ref="input" :value="value" @change="change" @keyup="change"> | |
<div v-if="error" class="form-error">{{ error }}</div> | |
</div> | |
</template> | |
<script> | |
import pikaday from 'pikaday' |
<?php | |
use PhpCsFixer\Config; | |
use PhpCsFixer\Finder; | |
$rules = [ | |
'array_indentation' => true, | |
'array_syntax' => ['syntax' => 'short'], | |
'binary_operator_spaces' => [ | |
'default' => 'single_space', |
# Change to the project directory | |
cd $FORGE_SITE_PATH | |
# Turn on maintenance mode | |
php artisan down || true | |
# Pull the latest changes from the git repository | |
# git reset --hard | |
# git clean -df | |
git pull origin $FORGE_SITE_BRANCH |
#!/usr/bin/env ruby | |
# Input arguments | |
source_path = ARGV[0] | |
destinationPath = ARGV[1] || '~/Desktop/ember_backup' | |
# Creade destination directory if it doesn't exist | |
`mkdir -p #{destinationPath}` | |
# Find the embersnaps in the directory and count them |
// Creates a new promise that automatically resolves after some timeout: | |
Promise.delay = function (time) { | |
return new Promise((resolve, reject) => { | |
setTimeout(resolve, time) | |
}) | |
} | |
// Throttle this promise to resolve no faster than the specified time: | |
Promise.prototype.takeAtLeast = function (time) { | |
return new Promise((resolve, reject) => { |
Reference:
sudo fdisk -l
This gist was getting a lot of comments/questions, but since there are no notifications when someone replies to a gist, I've moved the setup instructions and a bunch of sample code to a dedicated Github repo.