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 / find_missing_sfv_in_subfolders.sh
Created August 23, 2019 11:40
Checks if all the subfolders contain *.SFV file. Reports the ones which don't have it.
#!/bin/bash
# Checks if all the subfolders contain *.SFV file. Reports the ones which don't have it.
for x in *;
do
ls ${x}/*.sfv >/dev/null
RESULT=$?
if [ $RESULT -eq 1 ]; then
echo 'NO SFV IN ${x}'
@luckylittle
luckylittle / group_vars.md
Created October 22, 2019 12:10
Ansible group_vars with alternative directory layout and vault
@luckylittle
luckylittle / palmknihy-free-ebooks.txt
Created November 14, 2019 11:35
PalmKnihy.cz - scraped list of all free ebooks (2019-11-14)
"https://www.palmknihy.cz/nakladatel/130313/84?book_id=6599-cart&do=buyItem"
"https://www.palmknihy.cz/nakladatel/130313/84?book_id=6600-cart&do=buyItem"
"https://www.palmknihy.cz/nakladatel/130313/84?book_id=6601-cart&do=buyItem"
"https://www.palmknihy.cz/nakladatel/130313/84?book_id=6603-cart&do=buyItem"
"https://www.palmknihy.cz/nakladatel/130313/84?book_id=6604-cart&do=buyItem"
"https://www.palmknihy.cz/nakladatel/130313/84?book_id=6607-cart&do=buyItem"
"https://www.palmknihy.cz/nakladatel/130313/84?book_id=6608-cart&do=buyItem"
"https://www.palmknihy.cz/nakladatel/130313/84?book_id=6611-cart&do=buyItem"
"https://www.palmknihy.cz/nakladatel/130313/84?book_id=6612-cart&do=buyItem"
"https://www.palmknihy.cz/nakladatel/130313/84?book_id=6613-cart&do=buyItem"
@luckylittle
luckylittle / gist:ff7ed729784345fdafa32db7fd46c81c
Created December 9, 2019 10:09
Create 50MB RAR volumes & use the old style volume naming scheme
# RAR 5.80 b4 Copyright (c) 1993-2019 Alexander Roshal [5 Dec 2019]
rar a -m0 -ma4 -vn -v50000000b Rambo.2008.720p.BDRip.XviD-SHiRK.rar Rambo.2008.720p.BDRip.XviD-SHiRK.avi
@luckylittle
luckylittle / lambda.py
Last active February 11, 2020 05:29
AWS Lambda for reactive processes triggered by AWS CloudWatch Events - triggers Ansible execution in Red Hat Ansible Tower
# Handler: lambda.main
# Makes an API call to Red Hat Ansible Tower to launch an Ansible job
from botocore.vendored import requests # This dependency was removed from Botocore and will be removed from Lambda after 2020/03/31
import urllib3
import json
def main(event,context):
"""
AWS Lambda uses 2 parameters (event, context) to provide data to the handler, but we don't really need them for this
"""
@luckylittle
luckylittle / episode720p.sh
Last active June 20, 2024 02:50
How to download the best quality video+audio from YouTube?
#!/bin/bash
export python=/usr/bin/python
NAME="Living.With.Hitler"
SEASON="01"
EPISODE="03"
RLS=CZECH.720p.WEB.H264-TUZEX
EXTENSION=\%\(ext\)s
URL=https://www.ceskatelevize.cz/porady/13994065402-zivot-s-hitlerem/221382572220003/
@luckylittle
luckylittle / epub.css.patch
Created April 9, 2020 22:59
Patch for the faulty epub.css in Building Secure and Reliable Systems ebook by Heather Adkins, Betsy Beyer, Paul Blankinship, Ana Oprea, Piotr Lewandowski, Adam Stubblefield
--- epub.css 2020-03-12 14:34:26.000000000 +1100
+++ epub-new.css 2020-04-09 20:26:32.000000000 +1000
@@ -142,7 +142,6 @@
h1, div.toc-title, h2, h3, h4, h5 {
-webkit-hyphens: none;
hyphens: none;
- adobe-hyphenate: none;
font-weight: bold;
text-align: left;
page-break-after: avoid !important;
@luckylittle
luckylittle / gist:436e8cb50d14055c1ccea9302b031b39
Created April 20, 2020 10:42
SMB mount location in RHEL8 (GNOME version 3.28.2)
/run/user/$(id -u)/gvfs/smb-share:server=${server_ip},share=${share_name}/
@luckylittle
luckylittle / fix_dblcmd_libunrar.sh
Last active June 20, 2024 03:59
Double Commander v0.9.6 fix for error "Cannot load library libunrar.so! Please check your installation."
#!/bin/bash
# > This is fix for "Cannot load library libunrar.so! Please check your installation."
# > doublecmd-gtk-0.9.6-1.2.x86_64 was installed with Alexx2000 repository:
# > http://download.opensuse.org/repositories/home:/Alexx2000/CentOS_7/x86_64/
wget http://www.rarlab.com/rar/unrarsrc-5.9.2.tar.gz
tar xvzf unrarsrc-5.9.2.tar.gz
cd unrar
make -f makefile lib
@luckylittle
luckylittle / hosts.ini
Created April 28, 2020 05:44
An example of Red Hat Ansible inventory in the YAML format
[localhost]
localhost ansible_connection = local
[datastore]
10.20.30.40 # Datastore
[portal]
10.20.30.50 # Portal
[server]