This file contains hidden or 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
us-east-1;Virginia;38.13;-78.45 | |
us-east-2;Ohio;39.96;-83 | |
us-west-1;California;37.35;-121.96 | |
us-west-2;Oregon;46.15;-123.88 | |
eu-west-1;Ireland;53;-8 | |
eu-west-2;London;51;-0.1 | |
eu-west-3;Paris;48.86;2.35 | |
eu-central-1;Frankfurt;50;8 | |
sa-east-1;Sao Paulo;-23.34;-46.38 | |
ap-southeast-1;Singapore;1.37;103.8 |
This file contains hidden or 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
root@scw-985e9d:~# sysbench --test=fileio --num-threads=6 --file-total-size=10G --file-test-mode=rndrw --max-requests=-1 --max-time=300 | |
run | |
sysbench 0.4.12: multi-threaded system evaluation benchmark | |
Running the test with following options: | |
Number of threads: 6 | |
This file contains hidden or 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
version: '3' | |
services: | |
concourse-db: | |
image: postgres | |
environment: | |
- POSTGRES_DB=concourse | |
- POSTGRES_PASSWORD=concourse_pass | |
- POSTGRES_USER=concourse_user | |
- PGDATA=/database |
This file contains hidden or 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
{ | |
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"vmName": { | |
"type": "string", | |
"defaultValue": "newvm", | |
"metadata": { | |
"description": "Name of the VM" | |
} |
This file contains hidden or 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
add_filter('upload_dir', 'cdn_upload_url'); | |
function cdn_upload_url($args) | |
{ | |
$current_user = wp_get_current_user(); | |
$current_user_id = $current_user->ID; | |
$is_id_user = ($current_user_id > 0) ? true : false; | |
switch($is_id_user) | |
{ | |
case true: | |
$admin_users = array('administrator', 'editor', 'author'); //Add roles that you don't want to CDN swap |
This file contains hidden or 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
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PolicyAgent] | |
"AssumeUDPEncapsulationContextOnSendRule"=dword:00000002 |
This file contains hidden or 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
axios({ | |
url: 'http://localhost:5000/static/example.pdf', | |
method: 'GET', | |
responseType: 'blob', // important | |
}).then((response) => { | |
const url = window.URL.createObjectURL(new Blob([response.data])); | |
const link = document.createElement('a'); | |
link.href = url; | |
link.setAttribute('download', 'file.pdf'); | |
document.body.appendChild(link); |
This file contains hidden or 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
function isEmail(s) { | |
return /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(s); | |
} |
This file contains hidden or 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
# This dockerfile provides an example of using the production image in a working stack | |
version: '2' | |
services: | |
mysql: | |
ports: | |
- 3306:3306 | |
image: mysql:5.6 | |
hostname: mysql |
This file contains hidden or 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
const path = require('path'); | |
exports.handler = (event, context, callback) => { | |
const request = event.Records[0].cf.request; | |
if (!path.extname(request.uri)) { | |
if (!request.uri.endsWith('/')) { | |
request.uri += '/'; | |
} | |
request.uri += 'index.html'; | |
} |