Add .bashrc, and license information

This commit is contained in:
luca0N! 2025-03-15 23:48:53 -03:00
parent a74bd7bca2
commit e8549dea1d
Signed by: luca0N
GPG key ID: 5978D960572B449E
4 changed files with 95 additions and 0 deletions

59
.bashrc Normal file
View file

@ -0,0 +1,59 @@
# SPDX-License-Identifier: Unlicense
# Skip script if not running interactively
if [[ $- != *i* ]] ; then
return
fi
# Set permissions for file/directory owner only by default
umask 0077
echo -ne '\e[16;125]'
export EDITOR='nvim'
export HISTCONTROL=ignorespace
export HISTFILESIZE=5000
export HISTSIZE=5000
export PATH="${PATH}:${HOME}/.local/bin"
# Use interactive option to prevent accidental data loss
alias cp='cp -pi'
alias mv='mv -i'
alias rm='rm -i'
# Short commands
alias ll='ls -l'
# Get rid of commands that have verbose output by default
alias ffmpeg='ffmpeg -hide_banner'
## Function commands ##
# Retrieves a specific line number of a specified text file.
#
# Syntax: $0 <FILENAME> <LINE NUMBER>
function lnof() {
if [[ $1 =~ ^-(-help|h)$ ]]; then
echo "syntax: $0 <FILENAME> <LINE NUMBER>" >&2
return
fi
if [[ -z "$1" || -z "$2" ]]; then
echo "error: missing required options" >&2
fi
head -n $2 $1 | tail -1
}
# Creates, then displays a temporary QR code with given data passed through
# standard input.
#
# Syntax: $0
function qrnow() {
if [[ $1 =~ ^-(-help|h)$ ]]; then
echo "$0: displays a QR code for given data"
echo "pipe data to this command to create a temporary QR code, then show it"
return
fi
qrencode -t png -o - | ffplay -hide_banner -i - >/dev/null
}

8
COPYING.md Normal file
View file

@ -0,0 +1,8 @@
# License
<!-- SPDX-License-Identifier: Unlicense -->
All source files in this repository are licensed under the Unlicense license.
You are free to use this software for any purpose. For more information, [see
the LICENSE.Unlicense.md file](LICENSE.Unlicense.md).

24
LICENSE.Unlicense.md Normal file
View file

@ -0,0 +1,24 @@
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <https://unlicense.org/>

View file

@ -8,3 +8,7 @@ Note that this repository also contains some runnable utility scripts, located
under `~/.local/bin`. This path is added automatically to the `$PATH`
environment variable.
## License
Please see the [COPYING](COPYING.md) file for copyright and license information.