The contents of this article have moved to a new, happier home https://aka.ms/Redis/DataLoss
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 axios from "axios"; | |
const singleton = Symbol(); | |
const singletonEnforcer = Symbol(); | |
function readCookie(name) { | |
const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); | |
return (match ? decodeURIComponent(match[3]) : null); | |
} |
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
# Deployment with zero downtime | |
# By default keeps 2 last deployments in KEEP_DEPLOYMENTS_DIR and current deployment | |
# Project domain | |
PROJECT_NAME=test.com | |
# Project directory | |
PROJECT_DIR=/home/forge/test.com | |
# Deployments directory | |
KEEP_DEPLOYMENTS_DIR=/home/forge/deploy |
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
filter: | |
excluded_paths: | |
- 'app/*' | |
- 'tests/*' | |
- 'bin/*' | |
- '*.min.js' | |
- 'web/assets/vendor/*' | |
- 'var/' | |
checks: |
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
'use strict'; | |
const gulp = require('gulp'); | |
const sourcemaps = require('gulp-sourcemaps'); | |
const browserSync = require('browser-sync'); | |
const reload = browserSync.reload; | |
gulp.task('build:css', ['lint:css'], function () { | |
const postcss = require('gulp-postcss'); | |
const nano = require('gulp-cssnano'); |
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
/* | |
* Default Body Class Styles | |
* Generated by body_class() | |
*/ | |
.rtl {} | |
.home {} | |
.blog {} | |
.archive {} | |
.date {} |
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
#!/usr/bin/env bash | |
# @param string $1 | |
# Input string. | |
# @param int $2 | |
# Cut an amount of characters from left side of string. | |
# @param int [$3] | |
# Leave an amount of characters in the truncated string. | |
substr() | |
{ |