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; | |
} |
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
#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
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
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
#!/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 |
OlderNewer