Powered by https://4sysops.com/archives/deploying-an-azure-jumpbox-jump-server/
brew update && brew install azure-cli
then login
az login
https://app.cacher.io/ az account list-locations --output table
/* WE ARE ASSUMING JQUERY IS LOADED AND USING jQuery instead of $ */ | |
jQuery(document).ready(function($) { | |
window.setInterval(function(){ | |
/// call your function here | |
$('#increment').trigger('click'); | |
}, 5000); | |
}); | |
/* |
# Double-container Dockerfile for separated build process. | |
# If you're just copy-pasting this, don't forget a .dockerignore! | |
# We're starting with the same base image, but we're declaring | |
# that this block outputs an image called DEPS that we | |
# won't be deploying - it just installs our npm deps | |
FROM node:14-alpine AS deps | |
# If you need libc for any of your deps, uncomment this line: | |
# RUN apk add --no-cache libc6-compat |
// Make sure you run this file from the project root | |
// or use `npm run email` | |
import nodemailer from "nodemailer"; | |
import * as dotenv from "dotenv"; | |
import path from "path"; | |
dotenv.config({ | |
// path: path.resolve(path.basename(path.dirname(process.cwd())), ".env"), | |
}); | |
console.log( | |
"Setup email config: ", |
import { useRouter } from "next/router"; | |
const function getAssetTypeFirstLetterUppercase(){ | |
const { query } = useRouter(); | |
// Format first letter to be capitalized | |
const assetType = query?.type | |
? query?.type[0].toUpperCase() + query?.type.slice(1) | |
: undefined; | |
} |
$timer = new timer(1); // constructor starts the timer, so no need to do it ourselves | |
/* | |
... mysql query ... | |
*/ | |
$query_time = $timer->get(); | |
/* | |
... page processing ... |
// setup one language for admin and the other for theme | |
// must be called before load_theme_textdomain() | |
function set_my_locale($locale) { | |
$locale = ( is_admin() ) ? "en_US" : "it_IT"; | |
setlocale(LC_ALL, $local ); | |
return $locale; | |
} | |
add_filter( 'locale', 'set_my_locale' ); |
Powered by https://4sysops.com/archives/deploying-an-azure-jumpbox-jump-server/
brew update && brew install azure-cli
then login
az login
https://app.cacher.io/ az account list-locations --output table
lando init --recipe=wordpress --webroot=. --option via=nginx --option php=7.2 --option database=mariadb --option xdebug=true --source=cwd --name=osp | |
lando start | |
lando wp core download | |
lando wp config create --dbname=wordpress --dbuser=wordpress --dbpass=wordpress | |
lando wp core install --quiet --admin_email="admin@lando.site" --title="LandoSite" --admin_user=admin --admin_password=password --url=https://osp.lndo.site | |
lando wp theme delete twentythirteen ; lando wp theme delete twentyfourteen; lando wp theme delete twentyfifteen; lando wp theme delete twentysixteen; lando wp plugin delete hello; lando wp plugin delete akismet;; |
#matches all .dev TLDs | |
log_format main 'MAIN: $remote_addr - $remote_user [$time_local] ' | |
'"$request" $status $body_bytes_sent ' | |
'"$http_referer" "$http_user_agent" "$gzip_ratio"'; | |
log_format wpc 'WPCONTENT: $remote_addr - $remote_user [$time_local] ' | |
'"$request" $status $body_bytes_sent ' | |
'"$http_referer" "$http_user_agent" "$gzip_ratio"'; | |
log_format PROXY 'PROXY: $remote_addr - $remote_user [$time_local] ' |
<?php | |
if (!empty($_SERVER['HTTP_HOST'])) | |
{ | |
$site = get_site_by_path(strtolower($_SERVER['HTTP_HOST']), '/'); | |
define('COOKIE_DOMAIN', '.'.$site->domain); | |
} |