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 / manning.py
Last active September 13, 2020 10:41
Manning Publications - Creates folder structure based on the products in your dashboard
#!/bin/python3
"""
Author: Lucian Maly
"""
import requests
from bs4 import BeautifulSoup
import datetime
import os
@luckylittle
luckylittle / extract_href.py
Last active September 22, 2020 11:21
Super easy hyperlink extractor for local HTML
#!/bin/python3
from bs4 import BeautifulSoup
import os
file = open("audible.html", "r")
html_doc = file.read()
soup = BeautifulSoup(html_doc, 'html.parser')
@luckylittle
luckylittle / audible_sort_by_price.txt
Last active September 22, 2020 12:27
Audible.com.au all categories sorted by price
# 1 Action-Thrillers-Audiobooks
https://www.audible.com.au/search?node=2683326051&pageSize=50&sort=price-asc-rank&page=1
# 2 Contemporary-Quests-Audiobooks
https://www.audible.com.au/search?node=2683327051&pageSize=50&sort=price-asc-rank&page=1
# 3 Historical-Adventures-Audiobooks
https://www.audible.com.au/search?node=2683328051&pageSize=50&sort=price-asc-rank&page=1
# 4 Military-Action-Audiobooks
https://www.audible.com.au/search?node=2683329051&pageSize=50&sort=price-asc-rank&page=1
# 5 Spy-Stories-Audiobooks
https://www.audible.com.au/search?node=2683330051&pageSize=50&sort=price-asc-rank&page=1
@luckylittle
luckylittle / default
Last active July 29, 2021 01:03
Configuration of PXE Boot & Repository server in VirtualBox for automated install of RHEL 8.2 (VirtualBox <-> laptop)
default menu.c32
prompt 0
timeout 300
ONTIMEOUT local
label 1
menu label ^1) Install RHEL 8 with Local Repo
kernel rhel8/vmlinuz
append initrd=rhel8/initrd.img method=http://192.168.130.2/rhel8 devfs=nomount
@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##*.}"
@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 / 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 / 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 / .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 / 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