mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2025-02-20 15:41:10 +01:00
Compare commits
7 Commits
a76b159eb3
...
5ac2ad0f61
Author | SHA1 | Date | |
---|---|---|---|
5ac2ad0f61 | |||
350e8d2f78 | |||
74c4463dca | |||
f2881b8870 | |||
16cc8855c7 | |||
345fe98f79 | |||
6bfeaa46d8 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -14,7 +14,6 @@
|
|||||||
!.nvmrc
|
!.nvmrc
|
||||||
!.pre-commit-config.yaml
|
!.pre-commit-config.yaml
|
||||||
!.prettierignore
|
!.prettierignore
|
||||||
!.prettierrc.json
|
|
||||||
!.renovate-shared.json*
|
!.renovate-shared.json*
|
||||||
!.reuse
|
!.reuse
|
||||||
|
|
||||||
|
@ -65,18 +65,10 @@ repos:
|
|||||||
|
|
||||||
- repo: local
|
- repo: local
|
||||||
hooks:
|
hooks:
|
||||||
- id: install-dev-deps
|
|
||||||
name: Install pnpm dev dependencies
|
|
||||||
entry: corepack pnpm install -D
|
|
||||||
language: system
|
|
||||||
always_run: true
|
|
||||||
#verbose: true
|
|
||||||
pass_filenames: false
|
|
||||||
- id: prettier
|
- id: prettier
|
||||||
name: prettier
|
name: prettier
|
||||||
entry: corepack pnpm exec prettier --cache --ignore-unknown --write
|
entry: corepack pnpx prettier --cache --ignore-unknown --write
|
||||||
language: system
|
language: system
|
||||||
exclude_types: [json]
|
|
||||||
|
|
||||||
# .editorconfig validity checking
|
# .editorconfig validity checking
|
||||||
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
|
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
|
||||||
|
@ -1,36 +0,0 @@
|
|||||||
{
|
|
||||||
"bracketSameLine": true,
|
|
||||||
"endOfLine": "auto",
|
|
||||||
"insertPragma": true,
|
|
||||||
"overrides": [
|
|
||||||
{
|
|
||||||
"files": ".prettierrc",
|
|
||||||
"options": {
|
|
||||||
"parser": "json"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"files": "conf/librewolf.overrides.cfg",
|
|
||||||
"options": {
|
|
||||||
"parser": "babel"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"files": "conf/autoconfig.js.online",
|
|
||||||
"options": {
|
|
||||||
"parser": "babel"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"plugins": [
|
|
||||||
"@prettier/plugin-ruby",
|
|
||||||
"@prettier/plugin-xml",
|
|
||||||
"prettier-plugin-nginx",
|
|
||||||
"prettier-plugin-sh",
|
|
||||||
"prettier-plugin-toml"
|
|
||||||
],
|
|
||||||
"proseWrap": "always",
|
|
||||||
"quoteProps": "consistent",
|
|
||||||
"requirePragma": false,
|
|
||||||
"singleAttributePerLine": true
|
|
||||||
}
|
|
@ -13,6 +13,12 @@
|
|||||||
"matchPackagePatterns": [
|
"matchPackagePatterns": [
|
||||||
"*"
|
"*"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"groupName": "all pre-commit updates",
|
||||||
|
"matchUpdateTypes": [
|
||||||
|
"pre-commit"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pre-commit": {
|
"pre-commit": {
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
# Very Important Communication Programs, P2P, not expected to get sold
|
# Very Important Communication Programs, P2P, not expected to get sold
|
||||||
exec --no-startup-id flatpak run --env=TZ=UTC net.jami.Jami
|
# Unmaintained for personal reasons says the flatpak
|
||||||
|
#exec --no-startup-id flatpak run --env=TZ=UTC net.jami.Jami
|
||||||
exec --no-startup-id /usr/local/bin/briar
|
exec --no-startup-id /usr/local/bin/briar
|
||||||
|
@ -133,6 +133,10 @@
|
|||||||
"toolbar_pin": "force_pinned",
|
"toolbar_pin": "force_pinned",
|
||||||
"update_url": "https://clients2.google.com/service/update2/crx"
|
"update_url": "https://clients2.google.com/service/update2/crx"
|
||||||
},
|
},
|
||||||
|
"gphhapmejobijbbhgpjhcjognlahblep": {
|
||||||
|
"blocked_install_message": "Tämä on KDE-talous, jossa kukaan ei tietääkseni käytä GNOMEa. Tämä lisäosa KDEn vastaavasta poiketen on riippuvainen GNOMEsta.",
|
||||||
|
"installation_mode": "blocked"
|
||||||
|
},
|
||||||
"hojggiaghnldpcknpbciehjcaoafceil": {
|
"hojggiaghnldpcknpbciehjcaoafceil": {
|
||||||
"installation_mode": "normal_installed",
|
"installation_mode": "normal_installed",
|
||||||
"override_update_url": true,
|
"override_update_url": true,
|
||||||
|
10
package.json
vendored
10
package.json
vendored
@ -1,11 +1,7 @@
|
|||||||
{
|
{
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@prettier/plugin-ruby": "4.0.4",
|
"@aminda/global-prettier-config": "2024.28.4"
|
||||||
"@prettier/plugin-xml": "3.4.1",
|
|
||||||
"prettier": "3.3.2",
|
|
||||||
"prettier-plugin-nginx": "1.0.3",
|
|
||||||
"prettier-plugin-sh": "0.14.0",
|
|
||||||
"prettier-plugin-toml": "2.0.1"
|
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@9.5.0+sha512.140036830124618d624a2187b50d04289d5a087f326c9edfc0ccd733d76c4f52c3a313d4fc148794a2a9d81553016004e6742e8cf850670268a7387fc220c903"
|
"packageManager": "pnpm@9.5.0+sha512.140036830124618d624a2187b50d04289d5a087f326c9edfc0ccd733d76c4f52c3a313d4fc148794a2a9d81553016004e6742e8cf850670268a7387fc220c903",
|
||||||
|
"prettier": "@aminda/global-prettier-config"
|
||||||
}
|
}
|
||||||
|
60
pnpm-lock.yaml
generated
vendored
60
pnpm-lock.yaml
generated
vendored
@ -1,5 +1,3 @@
|
|||||||
# @format
|
|
||||||
|
|
||||||
lockfileVersion: "9.0"
|
lockfileVersion: "9.0"
|
||||||
|
|
||||||
settings:
|
settings:
|
||||||
@ -9,26 +7,17 @@ settings:
|
|||||||
importers:
|
importers:
|
||||||
.:
|
.:
|
||||||
devDependencies:
|
devDependencies:
|
||||||
"@prettier/plugin-ruby":
|
"@aminda/global-prettier-config":
|
||||||
specifier: 4.0.4
|
specifier: 2024.28.4
|
||||||
version: 4.0.4(prettier@3.3.2)
|
version: 2024.28.4
|
||||||
"@prettier/plugin-xml":
|
|
||||||
specifier: 3.4.1
|
|
||||||
version: 3.4.1(prettier@3.3.2)
|
|
||||||
prettier:
|
|
||||||
specifier: 3.3.2
|
|
||||||
version: 3.3.2
|
|
||||||
prettier-plugin-nginx:
|
|
||||||
specifier: 1.0.3
|
|
||||||
version: 1.0.3
|
|
||||||
prettier-plugin-sh:
|
|
||||||
specifier: 0.14.0
|
|
||||||
version: 0.14.0(prettier@3.3.2)
|
|
||||||
prettier-plugin-toml:
|
|
||||||
specifier: 2.0.1
|
|
||||||
version: 2.0.1(prettier@3.3.2)
|
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
|
"@aminda/global-prettier-config@2024.28.4":
|
||||||
|
resolution:
|
||||||
|
{
|
||||||
|
integrity: sha512-VjyTd8fFRnLgZRAMDRr9pm5hknnsVxpTCshvvE7RAiuH72hUzC82rm5vXDJjrhkedWJir2qZjmiC5Vo2LoR4tw==,
|
||||||
|
}
|
||||||
|
|
||||||
"@prettier/plugin-ruby@4.0.4":
|
"@prettier/plugin-ruby@4.0.4":
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
@ -99,10 +88,10 @@ packages:
|
|||||||
peerDependencies:
|
peerDependencies:
|
||||||
prettier: ^3.0.3
|
prettier: ^3.0.3
|
||||||
|
|
||||||
prettier@3.3.2:
|
prettier@3.3.3:
|
||||||
resolution:
|
resolution:
|
||||||
{
|
{
|
||||||
integrity: sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==,
|
integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==,
|
||||||
}
|
}
|
||||||
engines: { node: ">=14" }
|
engines: { node: ">=14" }
|
||||||
hasBin: true
|
hasBin: true
|
||||||
@ -127,14 +116,23 @@ packages:
|
|||||||
}
|
}
|
||||||
|
|
||||||
snapshots:
|
snapshots:
|
||||||
"@prettier/plugin-ruby@4.0.4(prettier@3.3.2)":
|
"@aminda/global-prettier-config@2024.28.4":
|
||||||
dependencies:
|
dependencies:
|
||||||
prettier: 3.3.2
|
"@prettier/plugin-ruby": 4.0.4(prettier@3.3.3)
|
||||||
|
"@prettier/plugin-xml": 3.4.1(prettier@3.3.3)
|
||||||
|
prettier: 3.3.3
|
||||||
|
prettier-plugin-nginx: 1.0.3
|
||||||
|
prettier-plugin-sh: 0.14.0(prettier@3.3.3)
|
||||||
|
prettier-plugin-toml: 2.0.1(prettier@3.3.3)
|
||||||
|
|
||||||
"@prettier/plugin-xml@3.4.1(prettier@3.3.2)":
|
"@prettier/plugin-ruby@4.0.4(prettier@3.3.3)":
|
||||||
|
dependencies:
|
||||||
|
prettier: 3.3.3
|
||||||
|
|
||||||
|
"@prettier/plugin-xml@3.4.1(prettier@3.3.3)":
|
||||||
dependencies:
|
dependencies:
|
||||||
"@xml-tools/parser": 1.0.11
|
"@xml-tools/parser": 1.0.11
|
||||||
prettier: 3.3.2
|
prettier: 3.3.3
|
||||||
|
|
||||||
"@taplo/core@0.1.1": {}
|
"@taplo/core@0.1.1": {}
|
||||||
|
|
||||||
@ -154,18 +152,18 @@ snapshots:
|
|||||||
|
|
||||||
prettier-plugin-nginx@1.0.3: {}
|
prettier-plugin-nginx@1.0.3: {}
|
||||||
|
|
||||||
prettier-plugin-sh@0.14.0(prettier@3.3.2):
|
prettier-plugin-sh@0.14.0(prettier@3.3.3):
|
||||||
dependencies:
|
dependencies:
|
||||||
mvdan-sh: 0.10.1
|
mvdan-sh: 0.10.1
|
||||||
prettier: 3.3.2
|
prettier: 3.3.3
|
||||||
sh-syntax: 0.4.2
|
sh-syntax: 0.4.2
|
||||||
|
|
||||||
prettier-plugin-toml@2.0.1(prettier@3.3.2):
|
prettier-plugin-toml@2.0.1(prettier@3.3.3):
|
||||||
dependencies:
|
dependencies:
|
||||||
"@taplo/lib": 0.4.0-alpha.2
|
"@taplo/lib": 0.4.0-alpha.2
|
||||||
prettier: 3.3.2
|
prettier: 3.3.3
|
||||||
|
|
||||||
prettier@3.3.2: {}
|
prettier@3.3.3: {}
|
||||||
|
|
||||||
regexp-to-ast@0.5.0: {}
|
regexp-to-ast@0.5.0: {}
|
||||||
|
|
||||||
|
232
rc/zshrc
232
rc/zshrc
@ -14,13 +14,13 @@ UNAME=$(uname)
|
|||||||
#case $TERM in
|
#case $TERM in
|
||||||
# (*xterm* | *rxvt*)
|
# (*xterm* | *rxvt*)
|
||||||
|
|
||||||
# Write some info to terminal title.
|
# Write some info to terminal title.
|
||||||
# This is seen when the shell prompts for input.
|
# This is seen when the shell prompts for input.
|
||||||
# function precmd {
|
# function precmd {
|
||||||
# print -Pn "\e]0;zsh%L %(1j,%j job%(2j|s|); ,)%~\a"
|
# print -Pn "\e]0;zsh%L %(1j,%j job%(2j|s|); ,)%~\a"
|
||||||
# }
|
# }
|
||||||
# Write command and args to terminal title.
|
# Write command and args to terminal title.
|
||||||
# This is seen while the shell waits for a command to complete.
|
# This is seen while the shell waits for a command to complete.
|
||||||
# function preexec {
|
# function preexec {
|
||||||
# printf "\033]0;%s\a" "$1"
|
# printf "\033]0;%s\a" "$1"
|
||||||
# }
|
# }
|
||||||
@ -30,9 +30,8 @@ UNAME=$(uname)
|
|||||||
|
|
||||||
# enable terminal bell
|
# enable terminal bell
|
||||||
|
|
||||||
if [[ -f /usr/bin/xset ]];
|
if [[ -f /usr/bin/xset ]]; then
|
||||||
then
|
(xset b on &)
|
||||||
(xset b on&)
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
##### Defaults etc... M0TZLS #####
|
##### Defaults etc... M0TZLS #####
|
||||||
@ -81,7 +80,7 @@ zstyle ':completion:*' menu select=2
|
|||||||
if [[ $UNAME != Darwin ]]; then
|
if [[ $UNAME != Darwin ]]; then
|
||||||
eval "$(dircolors -b)"
|
eval "$(dircolors -b)"
|
||||||
fi
|
fi
|
||||||
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
|
#zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
|
||||||
zstyle ':completion:*' list-colors ''
|
zstyle ':completion:*' list-colors ''
|
||||||
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
|
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
|
||||||
zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=* l:|=*'
|
zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=* l:|=*'
|
||||||
@ -94,23 +93,23 @@ zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
|
|||||||
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
|
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
|
||||||
|
|
||||||
# Show the hostname, uptime and users logged in on shell start
|
# Show the hostname, uptime and users logged in on shell start
|
||||||
if hash hostname 2>/dev/null; then
|
if hash hostname 2> /dev/null; then
|
||||||
(hostname&)
|
(hostname &)
|
||||||
fi
|
fi
|
||||||
(uptime&)
|
(uptime &)
|
||||||
(echo "")
|
(echo "")
|
||||||
|
|
||||||
if [[ $UNAME != Darwin ]] then;
|
#if [[ $UNAME != Darwin ]] then;
|
||||||
(who -H -w -u|head -n10&)
|
# (who -H -w -u|head -n10&)
|
||||||
(echo "")
|
# (echo "")
|
||||||
# (last -10 -w -x&)
|
# (last -10 -w -x&)
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
if [[ $UNAME = Darwin ]]; then
|
#if [[ $UNAME = Darwin ]]; then
|
||||||
(who -H -u|head -n10&)
|
# (who -H -u|head -n10&)
|
||||||
(echo "")
|
# (echo "")
|
||||||
(last -10&)
|
# (last -10&)
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
# Only print motivational phrases if username is aminda or mikaela
|
# Only print motivational phrases if username is aminda or mikaela
|
||||||
if [[ $(whoami) == aminda ]] || [[ $(whoami) == mikaela ]]; then
|
if [[ $(whoami) == aminda ]] || [[ $(whoami) == mikaela ]]; then
|
||||||
@ -157,15 +156,15 @@ if [ -f ~/.zshenv ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Enable core files.
|
# Enable core files.
|
||||||
(ulimit -c unlimited&)
|
(ulimit -c unlimited &)
|
||||||
|
|
||||||
# More colours
|
# More colours
|
||||||
if [[ $TERM == 'xterm' ]]; then
|
if [[ $TERM == 'xterm' ]]; then
|
||||||
export TERM=xterm-256color
|
export TERM=xterm-256color
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $TERM == 'screen' ]]; then
|
if [[ $TERM == 'screen' ]]; then
|
||||||
export TERM=screen-256color
|
export TERM=screen-256color
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Sets the default editor.
|
# Sets the default editor.
|
||||||
@ -198,7 +197,7 @@ CPUARCH=$(uname -p)
|
|||||||
if [ -f ~/.gnupg/sshcontrol ]; then
|
if [ -f ~/.gnupg/sshcontrol ]; then
|
||||||
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||||
gpgconf --launch gpg-agent
|
gpgconf --launch gpg-agent
|
||||||
gpg-connect-agent updatestartuptty /bye >/dev/null 2>&1
|
gpg-connect-agent updatestartuptty /bye > /dev/null 2>&1
|
||||||
# otherwise use the normal ssh-agent
|
# otherwise use the normal ssh-agent
|
||||||
else
|
else
|
||||||
# if the output is going to /dev/null, it's non/existence doesn't matter
|
# if the output is going to /dev/null, it's non/existence doesn't matter
|
||||||
@ -235,20 +234,20 @@ fi
|
|||||||
# https://github.com/rbenv/rbenv
|
# https://github.com/rbenv/rbenv
|
||||||
if [ -d ~/.rbenv/bin ]; then
|
if [ -d ~/.rbenv/bin ]; then
|
||||||
PATH="$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH"
|
PATH="$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH"
|
||||||
rbenv init >/dev/null 2>&1
|
rbenv init > /dev/null 2>&1
|
||||||
# Remember! And verify it before running!
|
# Remember! And verify it before running!
|
||||||
# git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
|
# git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Add RubyGems to PATH
|
# Add RubyGems to PATH
|
||||||
if hash ruby 2>/dev/null; then
|
if hash ruby 2> /dev/null; then
|
||||||
PATH="$(ruby -e 'print Gem.user_dir')/bin:$PATH"
|
PATH="$(ruby -e 'print Gem.user_dir')/bin:$PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# https://github.com/pyenv/pyenv
|
# https://github.com/pyenv/pyenv
|
||||||
if [ -d ~/.pyenv/bin ]; then
|
if [ -d ~/.pyenv/bin ]; then
|
||||||
PATH="$HOME/.pyenv/bin:$PATH"
|
PATH="$HOME/.pyenv/bin:$PATH"
|
||||||
pyenv init >/dev/null 2>&1
|
pyenv init > /dev/null 2>&1
|
||||||
# Worth considering (and verifying before running)
|
# Worth considering (and verifying before running)
|
||||||
# git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv
|
# git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv
|
||||||
# git clone https://github.com/pyenv/pyenv-virtualenvwrapper.git $(pyenv root)/plugins/pyenv-virtualenvwrapper
|
# git clone https://github.com/pyenv/pyenv-virtualenvwrapper.git $(pyenv root)/plugins/pyenv-virtualenvwrapper
|
||||||
@ -274,7 +273,7 @@ alias sudo="\sudo --preserve-env=tmux"
|
|||||||
alias ..="cd .."
|
alias ..="cd .."
|
||||||
|
|
||||||
# Use htop instead of top if available
|
# Use htop instead of top if available
|
||||||
if hash htop 2>/dev/null; then
|
if hash htop 2> /dev/null; then
|
||||||
alias top="htop"
|
alias top="htop"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -378,7 +377,7 @@ alias rsync-folder="rsync -h --progress -azvv "
|
|||||||
#fi
|
#fi
|
||||||
|
|
||||||
# Use GPG2 instead of GPG!
|
# Use GPG2 instead of GPG!
|
||||||
if hash gpg2 2>/dev/null; then
|
if hash gpg2 2> /dev/null; then
|
||||||
alias gpg=gpg2
|
alias gpg=gpg2
|
||||||
export KEYBASE_GPG=gpg2
|
export KEYBASE_GPG=gpg2
|
||||||
fi
|
fi
|
||||||
@ -398,11 +397,11 @@ alias refreshgroups="exec su -l $USER"
|
|||||||
alias ssh-pubkey-length="ssh-keygen -lf "
|
alias ssh-pubkey-length="ssh-keygen -lf "
|
||||||
|
|
||||||
# MSDOS commands. MSDOS is after every alias line to get these lines easily by grepping.
|
# MSDOS commands. MSDOS is after every alias line to get these lines easily by grepping.
|
||||||
alias cls=clear # MSDOS
|
alias cls=clear # MSDOS
|
||||||
alias help=man # MSDOS
|
alias help=man # MSDOS
|
||||||
alias ipconfig=ifconfig # MSDOS
|
alias ipconfig=ifconfig # MSDOS
|
||||||
alias copy=cp # MSDOS
|
alias copy=cp # MSDOS
|
||||||
alias move=mv # MSDOS
|
alias move=mv # MSDOS
|
||||||
|
|
||||||
# List git committers of repository
|
# List git committers of repository
|
||||||
alias git-committers="git shortlog -s"
|
alias git-committers="git shortlog -s"
|
||||||
@ -508,7 +507,7 @@ alias venvpypy=pypyvenv
|
|||||||
|
|
||||||
# cp/mv using rsync. rcp appears to be link to scp in my system, so I can
|
# cp/mv using rsync. rcp appears to be link to scp in my system, so I can
|
||||||
# safely use this alias.
|
# safely use this alias.
|
||||||
if hash rsync 2>/dev/null; then
|
if hash rsync 2> /dev/null; then
|
||||||
alias rcp="rsync -a --progress"
|
alias rcp="rsync -a --progress"
|
||||||
alias rmv="rsync -a --progress --remove-source-files"
|
alias rmv="rsync -a --progress --remove-source-files"
|
||||||
fi
|
fi
|
||||||
@ -575,8 +574,7 @@ alias mpvm="mpv --no-video"
|
|||||||
alias mpvms="mpv --no-video --shuffle"
|
alias mpvms="mpv --no-video --shuffle"
|
||||||
|
|
||||||
# Compatibility with my i3 alsactl mess
|
# Compatibility with my i3 alsactl mess
|
||||||
if [ -f ~/.config/asound.state ]
|
if [ -f ~/.config/asound.state ]; then
|
||||||
then
|
|
||||||
alias alsactl="\alsactl -f ~/.config/asound.state"
|
alias alsactl="\alsactl -f ~/.config/asound.state"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -594,14 +592,14 @@ alias chattr="\chattr -V"
|
|||||||
alias chmod="\chmod --verbose"
|
alias chmod="\chmod --verbose"
|
||||||
|
|
||||||
# https://github.com/nodejs/corepack/blob/v0.28.2/README.md#corepack-enable--name
|
# https://github.com/nodejs/corepack/blob/v0.28.2/README.md#corepack-enable--name
|
||||||
if hash corepack 2>/dev/null; then
|
if hash corepack 2> /dev/null; then
|
||||||
alias yarn="corepack yarn"
|
alias yarn="corepack yarn"
|
||||||
alias yarnpkg="corepack yarnpkg"
|
alias yarnpkg="corepack yarnpkg"
|
||||||
alias pnpm="corepack pnpm"
|
alias pnpm="corepack pnpm"
|
||||||
alias pnpx="corepack pnpx"
|
alias pnpx="corepack pnpx"
|
||||||
alias npm="corepack npm"
|
alias npm="corepack npm"
|
||||||
alias npx="corepack npx"
|
alias npx="corepack npx"
|
||||||
if ! hash prettier 2>/dev/null; then
|
if ! hash prettier 2> /dev/null; then
|
||||||
alias prettier="corepack pnpx prettier --cache --ignore-unknown"
|
alias prettier="corepack pnpx prettier --cache --ignore-unknown"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@ -612,7 +610,7 @@ fi
|
|||||||
alias pn="corepack pnpm"
|
alias pn="corepack pnpm"
|
||||||
|
|
||||||
# github-pages etc.
|
# github-pages etc.
|
||||||
if hash bundle 2>/dev/null; then
|
if hash bundle 2> /dev/null; then
|
||||||
alias jekyll="bundle exec jekyll"
|
alias jekyll="bundle exec jekyll"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -645,33 +643,33 @@ function geoip() {
|
|||||||
## for unit193 ;)
|
## for unit193 ;)
|
||||||
## use command "ex" to extract any archive files.
|
## use command "ex" to extract any archive files.
|
||||||
## "ex package.zip" for example
|
## "ex package.zip" for example
|
||||||
function ex ()
|
function ex() {
|
||||||
|
if [ -f "$1" ]; then
|
||||||
{
|
case "$1" in
|
||||||
if [ -f "$1" ] ; then
|
*.tar) tar xvf $1 ;;
|
||||||
case "$1" in
|
*.tar.bz2 | *.tbz2) tar xjvf $1 ;;
|
||||||
*.tar) tar xvf $1 ;;
|
*.tar.gz | *.tgz) tar xzvf $1 ;;
|
||||||
*.tar.bz2 | *.tbz2 ) tar xjvf $1 ;;
|
*.bz2) bunzip2 $1 ;;
|
||||||
*.tar.gz | *.tgz ) tar xzvf $1 ;;
|
*.rar) unrar x $1 ;;
|
||||||
*.bz2) bunzip2 $1 ;;
|
*.gz) gunzip $1 ;;
|
||||||
*.rar) unrar x $1 ;;
|
*.zip) unzip $1 ;;
|
||||||
*.gz) gunzip $1 ;;
|
*.Z) uncompress $1 ;;
|
||||||
*.zip) unzip $1 ;;
|
*.7z) 7z x $1 ;;
|
||||||
*.Z) uncompress $1 ;;
|
*.xz) tar xJvf $1 ;;
|
||||||
*.7z) 7z x $1 ;;
|
*.deb)
|
||||||
*.xz) tar xJvf $1 ;;
|
DIR=${1%%_*.deb}
|
||||||
*.deb)
|
ar xv $1
|
||||||
DIR=${1%%_*.deb}
|
mkdir ${DIR}
|
||||||
ar xv $1
|
tar -C ${DIR} -xzvf data.tar.gz
|
||||||
mkdir ${DIR}
|
;;
|
||||||
tar -C ${DIR} -xzvf data.tar.gz ;;
|
*.rpm) rpm2cpio $1 | cpio -vid ;;
|
||||||
*.rpm) rpm2cpio $1 | cpio -vid ;;
|
*)
|
||||||
*) echo ""${1}" cannot be extracted via extract()"
|
echo ""${1}" cannot be extracted via extract()"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
echo ""${1}" is not a valid file"
|
echo ""${1}" is not a valid file"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Given by nyuszika7h. Shortens GitHub URLs with git.io
|
# Given by nyuszika7h. Shortens GitHub URLs with git.io
|
||||||
@ -705,45 +703,45 @@ function gribble-gpg-everify() {
|
|||||||
|
|
||||||
function shell-things {
|
function shell-things {
|
||||||
|
|
||||||
export SHELL_THINGS_REPO=$HOME/.shell-things
|
export SHELL_THINGS_REPO=$HOME/.shell-things
|
||||||
|
|
||||||
# Check if ~/.shell-things exists and cd and pull.
|
# Check if ~/.shell-things exists and cd and pull.
|
||||||
if [ -d $SHELL_THINGS_REPO ]; then
|
if [ -d $SHELL_THINGS_REPO ]; then
|
||||||
echo "shell-things: $SHELL_THINGS_REPO exists, git pulling..."
|
echo "shell-things: $SHELL_THINGS_REPO exists, git pulling..."
|
||||||
echo ""
|
echo ""
|
||||||
cd $SHELL_THINGS_REPO
|
cd $SHELL_THINGS_REPO
|
||||||
git remote set-url origin https://gitea.blesmrt.net/Mikaela/shell-things.git
|
git remote set-url origin https://gitea.blesmrt.net/Mikaela/shell-things.git
|
||||||
git fetch --all
|
git fetch --all
|
||||||
git pull
|
git pull
|
||||||
git verify-commit HEAD
|
git verify-commit HEAD
|
||||||
sleep 10
|
sleep 10
|
||||||
echo ""
|
echo ""
|
||||||
echo "shell-things: Installing/Upgrading..."
|
echo "shell-things: Installing/Upgrading..."
|
||||||
echo ""
|
echo ""
|
||||||
# If it doesn't exist...
|
# If it doesn't exist...
|
||||||
else
|
else
|
||||||
echo ""
|
echo ""
|
||||||
echo "shell-things: $SHELL_THINGS_REPO doesn't exist, cloning..."
|
echo "shell-things: $SHELL_THINGS_REPO doesn't exist, cloning..."
|
||||||
echo ""
|
echo ""
|
||||||
git clone https://gitea.blesmrt.net/Mikaela/shell-things.git $SHELL_THINGS_REPO
|
git clone https://gitea.blesmrt.net/Mikaela/shell-things.git $SHELL_THINGS_REPO
|
||||||
cd $SHELL_THINGS_REPO
|
cd $SHELL_THINGS_REPO
|
||||||
sleep 10
|
sleep 10
|
||||||
echo ""
|
echo ""
|
||||||
echo "shell-things: Installing/Upgrading..."
|
echo "shell-things: Installing/Upgrading..."
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Installing...
|
# Installing...
|
||||||
bash -x ./install
|
bash -x ./install
|
||||||
echo ""
|
echo ""
|
||||||
echo "shell-things: Installing finished."
|
echo "shell-things: Installing finished."
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "shell-things: Everything is now done :)"
|
echo "shell-things: Everything is now done :)"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
cd
|
cd
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -765,12 +763,12 @@ cd
|
|||||||
# Use clang if installed. It seems interesting and this is probably good
|
# Use clang if installed. It seems interesting and this is probably good
|
||||||
# way to test it. This might not be a function, but I don't have any better
|
# way to test it. This might not be a function, but I don't have any better
|
||||||
# place for this.
|
# place for this.
|
||||||
if hash clang 2>/dev/null; then
|
if hash clang 2> /dev/null; then
|
||||||
export CC=clang
|
export CC=clang
|
||||||
export HOMEBREW_CC=clang
|
export HOMEBREW_CC=clang
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if hash clang++ 2>/dev/null; then
|
if hash clang++ 2> /dev/null; then
|
||||||
export CXX=clang++
|
export CXX=clang++
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -782,7 +780,7 @@ github-add-pulls() {
|
|||||||
|
|
||||||
# Get server SSL certificate fingerprint in MD5, SHA1 and SHA256.
|
# Get server SSL certificate fingerprint in MD5, SHA1 and SHA256.
|
||||||
# Note that OpenSSL doesn't support IPv6 at time of writing (2015-01-13).
|
# Note that OpenSSL doesn't support IPv6 at time of writing (2015-01-13).
|
||||||
serversslcertfp () {
|
serversslcertfp() {
|
||||||
SSSLCFFN=$(openssl s_client -showcerts -connect $1 < /dev/null)
|
SSSLCFFN=$(openssl s_client -showcerts -connect $1 < /dev/null)
|
||||||
# To see all validity information
|
# To see all validity information
|
||||||
echo "$SSSLCFFN"
|
echo "$SSSLCFFN"
|
||||||
@ -795,7 +793,7 @@ serversslcertfp () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# The same for local certificate file
|
# The same for local certificate file
|
||||||
sslcertfp () {
|
sslcertfp() {
|
||||||
cat $1 | openssl x509 -md5 -fingerprint -noout
|
cat $1 | openssl x509 -md5 -fingerprint -noout
|
||||||
cat $1 | openssl x509 -sha1 -fingerprint -noout
|
cat $1 | openssl x509 -sha1 -fingerprint -noout
|
||||||
cat $1 | openssl x509 -sha256 -fingerprint -noout
|
cat $1 | openssl x509 -sha256 -fingerprint -noout
|
||||||
@ -808,36 +806,36 @@ serversslciphers() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Generate SSL certificate
|
# Generate SSL certificate
|
||||||
sslgenpem () {
|
sslgenpem() {
|
||||||
openssl req -nodes -newkey rsa:4096 -keyout $1.pem -x509 -days 3650 -out $1.pem -subj "/CN=$2"
|
openssl req -nodes -newkey rsa:4096 -keyout $1.pem -x509 -days 3650 -out $1.pem -subj "/CN=$2"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Managing SSL certificates of Google Chrome
|
# Managing SSL certificates of Google Chrome
|
||||||
chrome-add-cert () {
|
chrome-add-cert() {
|
||||||
echo "Please ensure that either libnss3-tools or nss-tools is installed."
|
echo "Please ensure that either libnss3-tools or nss-tools is installed."
|
||||||
certutil -d sql:$HOME/.pki/nssdb -A -t "P,," -n $1 -i $1
|
certutil -d sql:$HOME/.pki/nssdb -A -t "P,," -n $1 -i $1
|
||||||
}
|
}
|
||||||
|
|
||||||
chrome-list-certs () {
|
chrome-list-certs() {
|
||||||
echo "Please ensure that either libnss3-tools or nss-tools is installed."
|
echo "Please ensure that either libnss3-tools or nss-tools is installed."
|
||||||
certutil -d sql:$HOME/.pki/nssdb -L # add '-h all' to see all built-in certs
|
certutil -d sql:$HOME/.pki/nssdb -L # add '-h all' to see all built-in certs
|
||||||
}
|
}
|
||||||
|
|
||||||
ssldownloadcert () {
|
ssldownloadcert() {
|
||||||
echo "Please ensure that either libnss3-tools or nss-tools is installed."
|
echo "Please ensure that either libnss3-tools or nss-tools is installed."
|
||||||
echo QUIT | openssl s_client -connect $1:443 | sed -ne '/BEGIN CERT/,/END CERT/p' | tee $1.pem
|
echo QUIT | openssl s_client -connect $1:443 | sed -ne '/BEGIN CERT/,/END CERT/p' | tee $1.pem
|
||||||
}
|
}
|
||||||
|
|
||||||
# Getting magnet from transmission-daemon
|
# Getting magnet from transmission-daemon
|
||||||
transmission-torrents () {
|
transmission-torrents() {
|
||||||
transmission-remote -l
|
transmission-remote -l
|
||||||
}
|
}
|
||||||
transmission-magnet () {
|
transmission-magnet() {
|
||||||
transmission-remote -l -t $1 -i | \grep magnet | awk -F': ' '{print $2}'
|
transmission-remote -l -t $1 -i | \grep magnet | awk -F': ' '{print $2}'
|
||||||
}
|
}
|
||||||
|
|
||||||
# Merges the last $1 commits into one
|
# Merges the last $1 commits into one
|
||||||
git-squash () {
|
git-squash() {
|
||||||
git reset --soft HEAD~$1
|
git reset --soft HEAD~$1
|
||||||
git commit
|
git commit
|
||||||
}
|
}
|
||||||
@ -849,8 +847,8 @@ mtrp() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# My IPv4 address
|
# My IPv4 address
|
||||||
myip4 () {
|
myip4() {
|
||||||
if hash dig 2>/dev/null; then
|
if hash dig 2> /dev/null; then
|
||||||
dig +short myip.opendns.com. A @208.67.222.222
|
dig +short myip.opendns.com. A @208.67.222.222
|
||||||
else
|
else
|
||||||
curl -L4s https://icanhazip.com/
|
curl -L4s https://icanhazip.com/
|
||||||
@ -858,8 +856,8 @@ myip4 () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# My IPv6 address
|
# My IPv6 address
|
||||||
myip6 () {
|
myip6() {
|
||||||
if hash dig 2>/dev/null; then
|
if hash dig 2> /dev/null; then
|
||||||
dig +short myip.opendns.com. AAAA @2620:0:ccc::2
|
dig +short myip.opendns.com. AAAA @2620:0:ccc::2
|
||||||
else
|
else
|
||||||
curl -L6s https://icanhazip.com/
|
curl -L6s https://icanhazip.com/
|
||||||
@ -869,13 +867,13 @@ myip6 () {
|
|||||||
# Easier verifying of SSH signed files: ssh-verify-file whatever@mikaela.info file.txt
|
# Easier verifying of SSH signed files: ssh-verify-file whatever@mikaela.info file.txt
|
||||||
# It's assumed that signature of file.txt is called as file.txt.sig
|
# It's assumed that signature of file.txt is called as file.txt.sig
|
||||||
sshAllowedSigners=$HOME/src/gitea.blesmrt.net/Mikaela/ssh-allowed_signers/allowed_signers
|
sshAllowedSigners=$HOME/src/gitea.blesmrt.net/Mikaela/ssh-allowed_signers/allowed_signers
|
||||||
ssh-verify-file () {
|
ssh-verify-file() {
|
||||||
echo "$1 ${2:?Usage: ssh-verify-file <email> <file-to-verify>}" > /dev/null
|
echo "$1 ${2:?Usage: ssh-verify-file <email> <file-to-verify>}" > /dev/null
|
||||||
ssh-keygen -Y verify -f $sshAllowedSigners -I $1 -n file -s $2.sig < $2
|
ssh-keygen -Y verify -f $sshAllowedSigners -I $1 -n file -s $2.sig < $2
|
||||||
}
|
}
|
||||||
|
|
||||||
# I use nvim, while I keep running vim instead
|
# I use nvim, while I keep running vim instead
|
||||||
if hash nvim 2>/dev/null; then
|
if hash nvim 2> /dev/null; then
|
||||||
vim() {
|
vim() {
|
||||||
echo 'using nvim instead'
|
echo 'using nvim instead'
|
||||||
/usr/bin/env nvim "$@"
|
/usr/bin/env nvim "$@"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user