Skip to content

Instantly share code, notes, and snippets.

View mavrck's full-sized avatar

Bill Condo mavrck

View GitHub Profile
@mikemartin
mikemartin / _seo.antlers.html
Last active January 6, 2022 19:27
SEO Basic
{{ 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 }}
@vanodevium
vanodevium / pre-commit.md
Created September 18, 2019 08:59
pre-commit configuration for laravel projects

Pre-commit installation

  • Add hooks configuration into extra segment of composer.json:
"extra": {
	"hooks": {
		"pre-commit": [
	   		"./vendor/bin/php-cs-fixer fix",
	       "git add -u"
@reinink
reinink / DateInput.vue
Created August 27, 2019 11:51
Pikaday Vue Component
<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'
@laravel-shift
laravel-shift / .php-cs-fixer.php
Last active April 9, 2024 14:08
PHP CS Fixer - Laravel Coding Style Ruleset
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
@BenSampo
BenSampo / deploy.sh
Last active April 30, 2024 03:41
Laravel deploy script
# 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
@vernalkick
vernalkick / ember_exporter.rb
Last active September 30, 2021 20:20
Ember Exporter
#!/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
@mehranhadidi
mehranhadidi / !NOTE.md
Created August 15, 2017 08:52 — forked from ivanvermeyen/!NOTE.md
Setup a Laravel Storage driver with Google Drive API
@adamwathan
adamwathan / promise-take-at-least.js
Last active February 26, 2023 14:25
Promise.takeAtLeast
// 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) => {
@keithmorris
keithmorris / drive-format-ubuntu.md
Last active May 1, 2024 12:39
Partition, format, and mount a drive on Ubuntu
@ivanvermeyen
ivanvermeyen / !NOTE.md
Last active March 15, 2023 05:25
Setup a Laravel Storage driver with Google Drive API