Skip to content

Instantly share code, notes, and snippets.

View luckylittle's full-sized avatar
:octocat:
Working for @RedHatOfficial

Lucian Maly luckylittle

:octocat:
Working for @RedHatOfficial
View GitHub Profile
@luckylittle
luckylittle / iPerf3.txt
Last active December 28, 2021 10:29
Command line options for iPerf3
# Iperf is a tool for network performance measurement and tuning. It is a cross-platform tool that can produce standardized
performance measurements for any network. Iperf has client and server functionality, and can create data streams to measure
the throughput between the two ends in one or both directions.
[user@server-1 ~]$ iperf3 -s –p 5001 -V --logfile iperf3_server2_20210118.log
1) Linear
[user@client-a ~]$ iperf3 -c –p 5001 –V --logfile iperf3_client-a_lin_20210118.log server-1 –u -4 –Z
[user@client-b ~]$ iperf3 -c –p 5001 –V --logfile iperf3_client-b_lin_20210118.log server-1 –u -4 –Z
@luckylittle
luckylittle / ocp3-garbage-collection.yml
Created February 12, 2021 10:44
Configuring garbage collection in OCP3, an example of appending to YAML in Ansible
---
# Configuring garbage collection in OCP3, an example of appending to YAML in Ansible
# Lucian Maly - Red Hat, Inc.
- name: Configuring garbage collection in OCP3
hosts: masters[0]
gather_facts: no
tasks:
- name: 1.0 | ocp3-garbage-collection.yml | Download the content of a ConfigMap
shell: |
oc extract cm/node-config-compute --to=/root --confirm=true -n openshift-node
@luckylittle
luckylittle / ocp3-etcd-monitoring.yml
Created February 12, 2021 10:41
An example of enabling ETCD monitoring in OCP3
---
# Configuring ETCD monitoring in OCP3
# Lucian Maly - Red Hat, Inc.
- name: Configuring etcd monitoring
hosts: masters[0]
gather_facts: no
tasks:
- name: 1.0 | ocp3-etcd-monitoring.yml | Fetch certificates from one master node to the local machine
fetch:
src: /etc/etcd/ca/{{ item }}
@luckylittle
luckylittle / rescene.sh
Last active February 16, 2024 09:55
Bulk rescene using srr.py and srs.py v0.7
#!/bin/zsh
for dir in */
do
[[ -d "$dir" ]] || break
echo "${dir}"
cd "${dir}" || exit
mkdir Sample
python ~/.local/bin/srr.py ./*.srr -y
python ~/.local/bin/srs.py ./*.srs ./*.mkv -y
@luckylittle
luckylittle / Enable_autologin_Win10.reg
Created January 14, 2021 02:33
This enables "Users must enter a user name and a password to use this computer" option in netplwiz
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\PasswordLess\Device]
"DevicePasswordLessBuildVersion"=dword:00000000
@luckylittle
luckylittle / .zsh_aliases
Last active March 19, 2025 01:19
Backup of ~/.zshrc
# General Aliases
alias beep='speaker-test -l 1 -t wav -w Beep.wav'
alias c="code ."
alias cdd='cd ~/Downloads'
alias chksfv='cksfv -C /home/lmaly/Downloads/ -qr'
#alias d="docker"
alias h="helm"
alias sudo='sudo '
alias v='vault'
alias vi="/usr/bin/vim"
@luckylittle
luckylittle / SSH PF.desktop
Last active August 8, 2022 01:48
An example of running SSH session via Desktop icon
[Desktop Entry]
Name=Terminal
Comment=Use the command line
Keywords=shell;prompt;command;commandline;cmd;
TryExec=gnome-terminal
Exec=/usr/bin/zsh -c "source ~/.zshrc ; tmux new-window -n PF ssh PF"
Icon=utilities-terminal
Type=Application
X-GNOME-DocPath=gnome-terminal/index.html
X-GNOME-Bugzilla-Bugzilla=GNOME
@luckylittle
luckylittle / org.keepassxc.keepassxc_browser.json
Created December 15, 2020 02:40
KeePassXC integration with Chromium/Iron (~/.config/chromium/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json)
{
"allowed_origins": [
"chrome-extension://iopaggbpplllidnfmcghoonnokmjoicf/",
"chrome-extension://oboonakemofpalcgghocfoadofidjkkk/",
"chrome-extension://ihkfcololioiohopfcoekpnmnnhfnejf/"
],
"description": "KeePassXC integration with native messaging support",
"name": "org.keepassxc.keepassxc_browser",
"path": "/usr/bin/keepassxc-proxy",
"type": "stdio"
@luckylittle
luckylittle / gist:77319645f916e2614d8b4680712f6012
Created December 3, 2020 02:18
Probably the most important command for OpenShift troubleshooting
oc get events --sort-by='.lastTimestamp' --all-namespaces
@luckylittle
luckylittle / rename.sh
Created October 29, 2020 10:38
Safely rename files inside directories with the same name as the parent directory name
#!/bin/bash
# Thu Oct 29 10:34:58 UTC 2020
# Lucian Maly, [email protected]
for pathname in $(ls -d1 */);
do
cd "${pathname}" || exit
for file in *
do
mv -iv "${file}" "$(basename "${pathname}").${file##*.}"