Skip to content

Instantly share code, notes, and snippets.

@yuraloginoff
yuraloginoff / switch.sh
Last active June 6, 2020 10:57
#bash: Switch
#!/bin/bash
# use case statement to make decision for rental
case $rental in
"car") echo "For $rental rental is Rs.20 per k/m.";;
"van") echo "For $rental rental is Rs.10 per k/m.";;
"jeep") echo "For $rental rental is Rs.5 per k/m.";;
"bicycle") echo "For $rental rental 20 paisa per k/m.";;
"enfield") echo "For $rental rental Rs.3 per k/m.";;
"thunderbird") echo "For $rental rental Rs.5 per k/m.";;
@yuraloginoff
yuraloginoff / check-for-args.sh
Last active June 6, 2020 10:55
#bash: Check for cli arguments
#!/bin/bash
# Exit if no arguments
[ $# -eq 0 ] && { echo "Usage: $0 param name"; exit 1; }
# if no command line arg given
# set var to Unknown
if [ -z $1 ]
then
@yuraloginoff
yuraloginoff / Elementary-install.sh
Last active June 8, 2020 13:52
#linux: After installing of Elementary OS
https://github.com/tonietto/Elementary-OS-First-Steps
https://elementaryos.stackexchange.com/questions/17452/how-to-display-system-tray-icons-in-elementary-os-juno
sudo mv /etc/xdg/autostart/nm-applet.desktop /etc/xdg/autostart/nm-applet.desktop-old
sudo apt-get install -y \
rename \
tldr \
git \
neofetch \
@yuraloginoff
yuraloginoff / .bashrc
Last active June 6, 2020 11:28
#bash: Customizing Bash environment and setup environment variables
#
# Customizing Bash environment
#
# Correct dir spellings
shopt -q -s cdspell
# Make sure display get updated when terminal window get resized
shopt -q -s checkwinsize
@yuraloginoff
yuraloginoff / Switch between shells
Last active June 12, 2020 13:08
#linux: Switch between shells
$ echo 'alias 2zsh="chsh -s $(which zsh)"' >> ~/.bashrc
$ echo 'alias 2bash="chsh -s $(which bash)"' >> ~/.zshrc
@yuraloginoff
yuraloginoff / .zshrc
Last active June 6, 2020 11:07
#linux:.zshrc
ZSH_THEME="avit"
plugins=(npm extract vscode web-search z)
#################
# #
# ALIASES #
# #
#################
@yuraloginoff
yuraloginoff / .nanorc
Last active June 6, 2020 11:03
#linux: .nanorc for nano v. 4.9.3
## Sample initialization file for GNU nano.
##
## VERSION 4.9.3
##
## Characters that are special in a shell should not be escaped here.
## Inside string parameters, quotes should not be escaped -- the last
## double quote on the line will be seen as the closing quote.
##
## For the options that take parameters, the default value is shown.
## Other options are unset by default. To make sure that an option
@yuraloginoff
yuraloginoff / google_dorks_joomla.txt
Last active May 3, 2022 10:34
#pentest: Google dorks for Joomla
intitle:"Joomla – Web Installer"
intitle:"Index of /" "joomla_update.php"
"Consola de Joomla! Debug" inurl:index.php
"Joomla! Administration Login" inurl:"/index.php"
"powered by joomla 3.2" OR "powered by joomla 3.3" OR "powered by joomla 3.4"
inurl:~~joomla3.txt filetype:txt
intext:"~~Joomla1.txt" title:"Index of /"
inurl:"index.php?option=com_bookjoomlas"
index2.php?option=com_joomlaboard
com_ijoomla_rss
@yuraloginoff
yuraloginoff / SHA256 Checksum
Last active June 6, 2020 11:20
#linux: SHA256 Checksum in Bash
$ shasum -a 256 FILENAME | awk '$1 == "SHA256 HASH" { print "good to go" }'