Skip to content

Instantly share code, notes, and snippets.

@Pela647
Pela647 / RH342.md
Created December 28, 2021 05:05 — forked from luckylittle/RH342.md
Red Hat RH342 Notes

Red Hat Enterprise Linux Diagnostics & Troubleshooting (RH342)

Last update: Fri Jul 26 08:23:20 UTC 2019 by @luckylittle


1. Troubleshooting principles

2. Generic issues

@Pela647
Pela647 / grab_pdfs.py
Created January 8, 2018 17:23 — forked from elssar/grab_pdfs.py
Download all the pdf files linked in a given webpage.
#!/usr/bin/env python
"""
Download all the pdfs linked on a given webpage
Usage -
python grab_pdfs.py url <path/to/directory>
url is required
path is optional. Path needs to be absolute
@Pela647
Pela647 / TextDecoder
Last active August 13, 2016 01:43
Translates short codes in SMS to meaningful words.
#Sample code for SMS decoder
import re, string
def chatDecoder():
abr=['b1','141','AA','AAK','AAF','A3','LOL','IAAG','FR']
longAbr=['be one','one for all and all for one','Ask about','Alive and kicking/Asleep at keyboard','As a friend/As a matter of fact','Anytime, Anywhere, Anyplace',\
'laugh out loud','i am a Genuis','for real']
message=input("What message do you want decoded? \n")
translator = str.maketrans({key: None for key in string.punctuation})
message=message.translate(translator)
messageToList=message.split() # change a sentence into a list so that i can loop through the words.