-
Install a working (and compiled) version of virt-viewer. You may view the homebrew package's upstream source on GitHub.
brew tap jeffreywildman/homebrew-virt-manager brew install virt-viewer
-
Once that's installed should be able make a call
remote-viewer
with a pve-spice.vv file downloaded from proxmox web interface
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
# Put this function to your .bashrc file. | |
# Usage: mv oldfilename | |
# If you call mv without the second parameter it will prompt you to edit the filename on command line. | |
# Original mv is called when it's called with more than one argument. | |
# It's useful when you want to change just a few letters in a long name. | |
# | |
# Also see: | |
# - imv from renameutils | |
# - Ctrl-W Ctrl-Y Ctrl-Y (cut last word, paste, paste) |
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
<?php | |
// пример работы с Keitaro TDS v6 по API (написан на PHP 7 (!) из-за Throwable) | |
// запрет кэширования этой страницы в CloudFlare/браузере | |
header("Cache-Control: private"); | |
// сюда можно воткнуть какой-то свой антибот, чтоб он отрабатывал до запуска общения с API | |
// примерно как-то так: | |
// require_once(__DIR__ . '/antibot.php'); |
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
<?php | |
/** | |
* @param WP_Query|null $wp_query | |
* @param bool $echo | |
* @param array $params | |
* | |
* @return string|null | |
* | |
* UPDATE for Bootstrap 5.0: https://gist.github.com/mtx-z/af85d3abd4c19a84a9713e69956e1507 | |
* |
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
<?php | |
add_action( 'pre_handle_404', function ( $false, $wp_query ) { | |
// если ярлык страницы содержит пробел... | |
$url = empty( $wp_query->query['pagename'] ) ? '' : $wp_query->query['pagename']; | |
if ( $url && strpos( $url, '%20' ) !== false ) { | |
$wp_query->set_404(); | |
status_header( 404 ); | |
nocache_headers(); |
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
<?php | |
/** | |
* Проверяет наличие метаполя поста с заданным занчением | |
* | |
* @param string $url уникальное значение для поста, к примеру путь будет url спаршенной статьи | |
* | |
* @return bool | |
*/ | |
function is_unique_meta_parse_post( $url ) { |
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
<?php | |
/** | |
* Изменяет порядок вывода постов в ленте через равные промежутки времени | |
* | |
* @param WP_Query $query | |
*/ | |
function change_rrs_posts_date( $query ) { | |
// Период обновления постов в ленте - 1 день | |
$period = 24 * HOUR_IN_SECONDS; |
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
# One liner | |
wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com | |
# Explained | |
wget \ | |
--recursive \ # Download the whole site. | |
--page-requisites \ # Get all assets/elements (CSS/JS/images). | |
--adjust-extension \ # Save files with .html on the end. | |
--span-hosts \ # Include necessary assets from offsite as well. | |
--convert-links \ # Update links to still work in the static version. |
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
<?php | |
function getTelegramAvatar($username='') | |
{ | |
$username = $username; | |
$username = str_replace('@', '', $username); | |
$baseURL = 'https://telegram.me/'; | |
$pageURL = $baseURL . $username; |
NewerOlder