Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!
openssl genrsa -des3 -out rootCA.key 4096| #!/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 |
| 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; |
| nice -n 5 find * -maxdepth 0 -type d | parallel -j 1 "tar -cf {}.tar {} && pixz -9 {}.tar {}.txz && rm {}.tar" |
| #etc/X11/xorg.conf.d/20-graphics.conf | |
| Section "Device" | |
| Identifier "Intel Graphics" | |
| Driver "modesetting" | |
| Option "AccelMethod" "glamor" | |
| EndSection |
| 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]; | |
| # } |
| 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; | |
| } |
| function ucmp($a, $b) | |
| { | |
| $diff = $a - $b; | |
| return ($diff > 0) - ($diff < 0); | |
| } | |
| usort([7,8,-1], "ucmp"); | |
| function you_get_the_idea($a, $b) | |
| { |
| 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 |
| function RecursiveParse($text) | |
| { | |
| if (is_array($text)) | |
| { | |
| $ret = []; | |
| foreach ($text as $row) | |
| $ret[] = RecursiveParse($row); | |
| return $ret; | |
| } |