Skip to content

Instantly share code, notes, and snippets.

@LordShedy
LordShedy / .bashrc
Last active March 19, 2022 22:46
MyBash
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
function bk() {
@LordShedy
LordShedy / .conkyrc
Last active August 10, 2021 06:08
Conky
-- vim: ts=4 sw=4 noet ai cindent syntax=lua
conky.config = {
alignment = 'top_left',
background = false,
border_width = 0.5,
cpu_avg_samples = 4,
default_color = 'white',
default_outline_color = 'grey',
default_shade_color = 'black',
draw_borders = true,
@LordShedy
LordShedy / var_dump-cleanser.py
Last active August 7, 2021 22:42
I like using the funcion of var_dump to debug my python code but after the debuggement is over I am too lazy to delete the lines containing var_dump, this script I wrote does it for you.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import sys
import logging
import re
LOGGER = logging.getLogger()
LOGGER_SEVERITY = logging.DEBUG
@LordShedy
LordShedy / regfere.py
Created May 14, 2020 22:07
Regex Find And Replace Script
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Regex Find And Replace script"""
import sys
import re
import argparse
def read_file_split_lines(data_file_path):
"""
function bk() {
if [[ -z $1 ]]; then
echo "Please, enter a path to a file to create the backup file of!"
else
local __path=${1}
local __timestamp=`date +'%Y%m%d%H%M'`
local __backup_file="${__path}.${__timestamp}.bk"
[[ -f "${__path}" ]] && cp "${__path}" "${__backup_file}"
echo "File "$1" was backed up as ${__backup_file}"
fi
@LordShedy
LordShedy / pokemon_go_apprisal.py
Created May 10, 2020 13:34
A Python script for getting Pokémon IV percentage from its appraisal.
#!/usr/bin/env python3
from enum import Enum
class Rates(Enum):
A = 15
B = 14
C = 13
D = 12
E = 11
@LordShedy
LordShedy / blocklist.txt
Last active January 30, 2020 12:33
BlockList for DNSCrypt
This file has been truncated, but you can view the full file.
00005ik.rcomhost.com
0001.2waky.com
000free.us
000freexxx.com
000.gaysexe.free.fr
000lk3v.wcomhost.com
000lkub.rcomhost.com
000ll4q.rcomhost.com
000lp59.wcomhost.com
000m9w3.wcomhost.com
@LordShedy
LordShedy / .bash_aliases
Last active January 19, 2020 19:24
Bash aliases
# function to hide aliases that do not work on MacOS
function drwn(){
if [[ `uname` != "Darwin" ]]
then
alias "${1}"
fi
}
### CD ###
alias home='cd ~'
@LordShedy
LordShedy / guide.md
Created January 21, 2019 18:30
How to make AirPods work with linux (Debian 4.9.0-8-amd64)

Steps

  1. set "ControllerMode = bredr" in /etc/bluetooth/main.conf

  2. sudo /etc/init.d/bluetooth restart

  3. pair again.

@LordShedy
LordShedy / sshd_config.bash
Last active October 11, 2019 07:56
SSHD configuration
### SSH DAEMON configuration by LordShedy ###
# allow client to pass locale environment variables
AcceptEnv LANG LC_*
# specifies which IP address family sshd should use
# it is possible to set for any (any), IPv4 only (inet) or IPv6 only (inet6)
AddressFamily inet
# is ssh-agent forwarding permitted