start new:
tmux
start new with session name:
tmux new -s myname
const NODE_ENV = process.env.NODE_ENV | |
const ExtractCssChunks = require("extract-css-chunks-webpack-plugin") | |
const webpack = require('webpack') | |
const path = require('path') | |
module.exports = { | |
mode: NODE_ENV, | |
entry: { app: path.resolve(__dirname, 'src/js/index') }, |
<?php | |
// check count args | |
if ($_SERVER['argc'] < 2) { | |
print('Please specify file name'. PHP_EOL); | |
exit(2); | |
} | |
$file_name = $_SERVER['argv'][1]; | |
$n = intval($_SERVER['argv'][2] ?? 10); |
<?php | |
declare(strict_types=1); | |
function generateSalt(int $length = 20): string | |
{ | |
$chars = 'abdefhiknrstyzABDEFGHKNQRSTYZ23456789'; | |
$numChars = strlen($chars); | |
$result = ''; |
FROM php:7.2-alpine | |
RUN apk update && apk add curl && \ | |
apk add --no-cache icu-dev \ | |
zlib-dev \ | |
g++ | |
RUN apk add --no-cache \ | |
expat \ | |
libcurl \ | |
musl \ |
// todos-vue/src/backend/axios/index.js | |
import axios from 'axios' | |
const API_URL = 'http://localhost:3000' | |
const securedAxiosInstance = axios.create({ | |
baseURL: API_URL, | |
withCredentials: true, | |
headers: { |
body { | |
background-color: #212121 !important; | |
background-clip: border-box !important; | |
background-origin: padding-box !important; | |
background-attachment: scroll !important; | |
background-repeat: repeat !important; | |
background-size: auto !important; | |
background-position: left top !important | |
} | |
pre, |
# Pass the env-vars to MYCOMMAND | |
eval $(egrep -v '^#' .env | xargs) MYCOMMAND | |
# … or ... | |
# Export the vars in .env into your shell: | |
export $(egrep -v '^#' .env | xargs) |
<?php | |
declare(strict_types=1); | |
$files = [ | |
'../path/to/file1.txt', | |
'../path/to/file2.txt', | |
'../path/to/file3.txt', | |
'../path/to/file4.txt', | |
]; |
MODE="" | |
TYPE="" | |
POSITIONAL=() | |
while [[ $# -gt 0 ]]; do | |
key="$1" | |
case $key in | |
-m | --mode) | |
MODE="$2" |