Short version: See docs.microsoft.com link below.
sudo apt-get update
sudo apt-get install linux-image-virtual linux-tools-virtual linux-cloud-tools-virtual
#!/bin/bash | |
for bucket in $(radosgw-admin bucket list | jq -r .[]); do | |
bucket_id=$(radosgw-admin metadata get bucket:${bucket} | jq -r .data.bucket.bucket_id) | |
marker=$(radosgw-admin metadata get bucket:${bucket} | jq -r .data.bucket.marker) | |
for instance in $(radosgw-admin metadata list bucket.instance | jq -r .[] | grep "^${bucket}:" | grep -v ${bucket_id} | grep -v ${marker}| cut -f2 -d':'); do | |
echo "${bucket}: ${instance}" | |
radosgw-admin bi purge --bucket=${bucket} --bucket-id=${instance} | |
radosgw-admin metadata rm bucket.instance:${bucket}:${instance} | |
done |
<?php | |
/** | |
* Automatically login a single WordPress user upon arrival to a specific page. | |
* | |
* Redirect to home page once logged in and prevent viewing of the login page. | |
* Compatible with WordPress 3.9.1+ | |
* Updated 2014-07-18 to resolve WP_DEBUG notice: "get_userdatabylogin is deprecated since version 3.3! Use get_user_by('login') instead." | |
* Updated 2019-07-09 to reformat code, pass 2nd parameter to `do_action()`, and hook into priority 1. | |
* |
<?php | |
global $wp_query; | |
echo "<pre>"; | |
var_dump($wp_query->query_vars); | |
var_dump($wp_query); | |
echo "</pre>"; | |
?> |
<?php | |
/** | |
* Link the FR translation and the EN translation | |
* Called by API https://domain.com/wp-json/link_translation/post/ | |
*/ | |
function custom_rest_link_translation($data) { | |
//Source https://wpml.org/wpml-hook/wpml_set_element_language_details/ |
#!/bin/sh | |
# This script based on linux-vm-tools for Ubuntu 22.02. | |
# Thanks to https://github.com/Hinara/linux-vm-tools/ to script | |
# This script is for Ubuntu 22.04 Jammy Jellyfish to download and install XRDP+XORGXRDP via | |
# source. | |
# | |
# Major thanks to: http://c-nergy.be/blog/?p=11336 for the tips. | |
# |
add_action( 'init', function(){ | |
if ( ! is_admin()) { | |
if( is_ssl() ){ | |
$protocol = 'https'; | |
}else { | |
$protocol = 'http'; | |
} | |
/** @var WP_Scripts $wp_scripts */ | |
global $wp_scripts; |
#!/bin/sh | |
movefrom='micronssd' | |
moveto='wdredpro' | |
for vm in $(qm list | awk '{print $1}' | grep -Eo '[0-9]{1,3}'); | |
do | |
for storage in $(qm config $vm | grep $movefrom: | awk '{print $1}' | grep -Eo '[a-z0-9]+'); | |
do | |
echo Moving VM$vm Storage $storage |
version: '3' | |
networks: | |
mynetwork: | |
ipam: | |
config: | |
- subnet: 172.20.0.0/24 | |
services: | |
nodered1: | |
image: nodered/node-red-docker | |
ports: |
sudo vim /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT
video=hyperv_fb:[the resolution you want]
, for example: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video=hyperv_fb:1920x1080"
sudo update-grub
sudo reboot