App-Cheats
view release on metacpan or search on metacpan
# Apt update has many 404 errors.
# Fix with:
sudo apt dist-upgrade.
#############################################################
## Linux Commands - apt-key
#############################################################
# Add the key of a package site to allow installing from other sources
wget -q http://opensource.wandisco.com/wandisco-debian.gpg -O- | sudo apt-key add -
#############################################################
## Linux Commands - apt-list
#############################################################
# List trusted source lists for packages
sudo apt-key list
# "|" can be used to each line as a separate command.
# ">" can be used to each block of new line separated lines
as a separate command.
#############################################################
## GPG Encryption (PGP Key)
#############################################################
# Generate a PGP key
gpg --gen-key
# Create a PGP signed file
gpg -ea -r "YOUR_NAME" > $HOME/.pause
user USER
password Pas$word
# Show your PGP keys (list)
gpg -k # Public keys.
gpg -K # Secret keys.
# Decrypt a PGP signed file.
gpg -d ~/.pause
# Cache password in agent.
# Some reason this fixed caching.
gpgconf --kill gpg-agent
# Share GPG keys (export from one, import in another machine).
gpg --export-secret-key -a > secretkey.asc
gpg --import secretkey.asc
# Warning: It is NOT certain that the key belongs to the person named.
gpg --edit-ḱeys YOUR_NAME
trust
5
yes
# Delete expired keys.
#
# Step 1: Create revoke certificate:
gpg --output revoke.asc --gen-revoke YOUR_ID
#
# Step 2: Apply revoke:
gpg --import revoke.asc
#
# Step 3: Delete secret key:
gpg --delete-secret-keys YOUR_ID
#
# Step 4: Delete public key:
gpg --delete-keys YOUR_ID
# Delete all keys.
gpg --delete-key 'Tim Potapov'
gpg --delete-secret-key 'Tim Potapov'
#############################################################
## HTML Attribute - href
#############################################################
# Run a javascript function when clicking a link instead of going to a page
<a class="myWrapper" href="javascript:myFunc()"><div class="myText">+</div></a>
( run in 0.556 second using v1.01-cache-2.11-cpan-e1769b4cff6 )