Skip to content

Instantly share code, notes, and snippets.

@gardar
gardar / playbook.ruby_to_json.md
Created June 13, 2022 20:26
Ansible playbook to convert ruby hash to json dict
- name: convert ruby hash to json
  debug:
    msg: "{{ ruby_hash |
          regex_replace('([{,]\\s*):([^>\\s]+)\\s*=>', '\\1\"\\2\"=>') |
          regex_replace('([{,]\\s*)([0-9]+\\.?[0-9]*)\\s*=>', '\\1\"\\2\"=>') |
          regex_replace('([{,]\\s*)(\".+?\"\\|[0-9]+\\.?[0-9]*)\\s*=>\\s*:([^,}\\s]+\\s*)', '\\1\\2=>\"\\3\"') |
          regex_replace('([\\[,]\\s*):([^,\\]\\s]+)', '\\1\"\\2\"') |
          regex_replace('=>nil', '=>null') |
          regex_replace('([{,]\\s*)(\".+?\"|[0-9]+\\.?[0-9]*)\\s*=>', '\\1\\2:') |
@gardar
gardar / yum_productversion.md
Created March 10, 2021 11:54
$productversion yum variable (version number i number format)

/etc/yum/vars/productversion

#!/bin/bash                         
. /etc/os-release                   
echo $REDHAT_SUPPORT_PRODUCT_VERSION

/etc/yum.repos.d/zfs.repo

[zfs] 
  Where-Object Name -contains check_mk_agent.exe | 
  Select-Object ProcessID, Name, Path, UserModeTime, KernelModeTime |
  Format-Table -AutoSize
ProcessID Name               Path UserModeTime KernelModeTime
--------- ----               ---- ------------ --------------
     3216 check_mk_agent.exe         166250000      210625000
@gardar
gardar / PKGBUILD
Created January 14, 2020 13:06
python-testinfra-3.4.0
# Maintainer: Morten Linderud <morten@linderud.pw>
# Maintainer: gardar <aur@gardar.net>
pkgbase="python-testinfra"
pkgname=("python-testinfra" "python2-testinfra")
_pkgname='testinfra'
pkgver=3.4.0
pkgrel=1
pkgdesc='Testinfra test your infrastructures'
url='https://github.com/philpep/testinfra'
@gardar
gardar / PKGBUILD
Created January 14, 2020 13:00
python-anyconfig-0.9.10
# Maintainer: Morten Linderud <morten@linderud.pw>
# Maintainer: Gardar <aur@gardar.net>
pkgbase="python-anyconfig"
pkgname=("python-anyconfig" "python2-anyconfig")
pkgver=0.9.10
pkgrel=2
pkgdesc='Generic access to configuration files in any formats (to be in the future)'
url='https://github.com/ssato/python-anyconfig'
arch=('any')
license=('MIT')
@gardar
gardar / PKGBUILD
Created January 5, 2020 03:44
arduino-pro-ide archlinux aur
# Maintainer: skuroedov <skuroedov@email.cz>
# Contributor: gardar <aur@gardar.net>
pkgname=arduino-pro-ide
pkgver=0.0.3
pkgrel=1
pkgdesc="The Arduino Pro IDE bring features that address the needs of advanced users whilst retaining continuity with the simple "classic" Arduino IDE."
arch=('x86_64')
depends=('libxss' 'gtk3' 'nodejs-lts-dubnium' 'nss' 'libxkbfile' 'python')
makedepends=('gendesk' 'ruby-ronn' 'git')
@gardar
gardar / PKGBUILD
Created January 16, 2019 02:56
vapoursynth-plugin-nnedi3cl-git meson/ninja PKGBUILD
# Maintainer: Gustavo Alvarez <sl1pkn07@gmail.com>
_plug=nnedi3cl
pkgname=vapoursynth-plugin-${_plug}-git
pkgver=r7.3.0.g2b74109
pkgrel=1
pkgdesc="Plugin for Vapoursynth: ${_plug} (GIT version)"
arch=('x86_64')
url='https://github.com/HomeOfVapourSynthEvolution/VapourSynth-NNEDI3CL'
license=('GPL2')
@gardar
gardar / PKGBUILD
Created January 16, 2019 02:39
vapoursynth-plugin-eedi3cl-git meson/ninja PKGBUILD
# Maintainer: Gustavo Alvarez <sl1pkn07@gmail.com>
_plug=eedi3cl
pkgname=vapoursynth-plugin-${_plug}-git
pkgver=r4.1.gefcba5f
pkgrel=1
pkgdesc="Plugin for Vapoursynth: ${_plug} (GIT version)"
arch=('i686' 'x86_64')
url='https://github.com/HomeOfVapourSynthEvolution/VapourSynth-EEDI3'
license=('GPL2')
@gardar
gardar / PKGBUILD
Created January 16, 2019 02:09
vapoursynth-plugin-bm3d-git meson/ninja PKGBUILD
# Maintainer: Gustavo Alvarez <sl1pkn07@gmail.com>
_plug=bm3d
pkgname=vapoursynth-plugin-${_plug}-git
pkgver=r8.0.g7b3d8dd
pkgrel=1
pkgdesc="Plugin for Vapoursynth: ${_plug} (GIT version)"
arch=('i686' 'x86_64')
url='http://forum.doom9.org/showthread.php?t=172172'
license=('MIT')
---- Nov 2, 2017 1:42:36 AM ----
01-03 02:56:12.824 324 324 E use-Rlog/RLOG-RIL-QMI: qmuxd: linux_qmi_read_sysfs_config: couldn't open file /sys/module/f_rmnet/parameters/rmnet_ctl_ch
01-03 02:56:12.826 324 324 E use-Rlog/RLOG-RIL-QMI: qmuxd: linux_qmi_read_sysfs_config: couldn't open /sys/module/rmnet/parameters/rmnet_ctl_ch
01-03 02:56:12.826 324 324 E use-Rlog/RLOG-RIL-QMI: linux_qmi_qmux_if_configure_port_timeout: mode=0, smd_timeout=20, hsic_timeout=60
01-03 02:56:12.827 324 324 E use-Rlog/RLOG-RIL-QMI: linux_qmi_qmux_if_configure_port_timeout: failed to open HSIC timeout config=/sys/devices/virtual/hsicctl/hsicctl0/modem_wait errno [2:No such file or directory]