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
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PolicyAgent] | |
"AssumeUDPEncapsulationContextOnSendRule"=dword:00000002 |
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
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 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 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 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 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 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
#!/bin/sh | |
palette="/tmp/palette.png" | |
filters="fps=15,scale=1000:-1:flags=lanczos" | |
ffmpeg -v warning -i $1 -vf "$filters,palettegen" -y $palette | |
ffmpeg -v warning -i $1 -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y $2 |
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
const data = Mydataspace.request('entities.get', { | |
root: 'MyDemoRoot', | |
path: 'data', | |
children: true, | |
filter: { | |
field1: 'test' | |
}, | |
offset: 10, | |
limit: 200 | |
}); |
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 timeout = ms => new Promise(res => setTimeout(res, ms)) | |
function convinceMe (convince) { | |
let unixTime = Math.round(+new Date() / 1000) | |
console.log(`Delay ${convince} at ${unixTime}`) | |
} | |
async function delay () { |
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
#!/bin/sh | |
# Make sure to: | |
# 1) Name this file `backup.sh` and place it in /home/ubuntu | |
# 2) Run sudo apt-get install awscli to install the AWSCLI | |
# 3) Run aws configure (enter s3-authorized IAM user and specify region) | |
# 4) Fill in DB host + name | |
# 5) Create S3 bucket for the backups and fill it in below (set a lifecycle rule to expire files older than X days in the bucket) | |
# 6) Run chmod +x backup.sh | |
# 7) Test it out via ./backup.sh |