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
#!/usr/bin/env bash | |
# PARAMETERS | |
# ---------- | |
# PHP | |
# --- | |
PHP_TIMEZONE="UTC" | |
PHP_DIRECTORY="/etc/php5ts" | |
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/bash | |
# ChatGPT from https://blog.modest-destiny.com/posts/kvm-libvirt-add-ceph-rbd-pool/ | |
# Allows adding multiple pools and use shared secret between them | |
# Define variables | |
VIRT_SCRT_PATH="/tmp/libvirt-secret.xml" | |
VIRT_POOL_PATH="/tmp/libvirt-rbd-pool.xml" | |
# Get script arguments |
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
to_direct_promise(functor, ...args) { | |
return this.to_promise(functor, ...args, undefined); | |
} | |
to_promise(functor, ...args) { | |
const options = args.pop(); | |
let resolve; | |
let reject; | |
const result = new Promise((res, cat) => { | |
resolve = res; |
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
ffmpeg -i input.mp4 -movflags +faststart -filter_complex "[0:v]minterpolate='fps=60:mi_mode=mci:me_mode=bidir:mc_mode=obmc:me=ds:vsbmc=1'" -preset ultrafast output.mp4 |
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
# | |
# Recommended minimum configuration: | |
# | |
# Example rule allowing access from your local networks. | |
# Adapt to list your (internal) IP networks from where browsing | |
# should be allowed | |
acl localnet src 10.0.0.0/8 # RFC1918 possible internal network | |
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network | |
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network |
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
nice -n 5 find * -maxdepth 0 -type d | parallel -j 1 "tar -cf {}.tar {} && pixz -9 {}.tar {}.txz && rm {}.tar" |
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
ffmpeg -vaapi_device /dev/dri/renderD128 -i input.mp4 -vf 'format=nv12,hwupload' -c:v hevc_vaapi output.mkv | |
#make sure that hvec profile is listed in vaapi command output |
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
#etc/X11/xorg.conf.d/20-graphics.conf | |
Section "Device" | |
Identifier "Intel Graphics" | |
Driver "modesetting" | |
Option "AccelMethod" "glamor" | |
EndSection |
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
rgrep -zoP "catch(?:.*){\n(?:.*\n){0,10}?(?:.*?(_logger)?.*\n)(?:.*\n){0,10}?.*}\n" | grep -aEvz "(.*.php).*(_logger).*?\n" | grep -aPo "(.*php)" | |
# catch (\Exception $e) { | |
# $this->_logger->critical($e); | |
# $message = __('An exception occurred while saving the address'); | |
# $response = ['error' => 'true', 'message' => $message]; | |
# } |
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
function initializeResizeEvents() { | |
jQuery('#select_size').on("change", function(event) { | |
var data = jQuery("#select_size option:selected").attr('resize-data'); | |
window.productPrice.resize = ''; | |
if (typeof(data) != 'undefined') { | |
if (data == 'custom') {} else { | |
data = eval('(' + data + ')'); | |
window.productHeight = data.height; | |
window.productWidth = data.width; | |
} |
NewerOlder