For symmetic encryption, you can use the following:
To encrypt:
openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt
To decrypt:
| #!/bin/bash | |
| # Bash Shell Script Cross-platform Generate Random String Easily With Pre-Installed System Tools | |
| MD5_BIN="md5sum" # default for windows git bash and linux | |
| COMMAND_OUTPUT=$(command -v md5sum) | |
| if [ ${#COMMAND_OUTPUT} -lt 1 ]; then | |
| MD5_BIN="md5" # OSX | |
| fi |
| find . -type f -print0 | xargs -0 dos2unix |
| #!/bin/bash | |
| # Description: Easily get or set secrets to or from the Google Cloud to your local repo for Docker dev. | |
| # Dependencies: kubectl (logged in with permissions to access kubernetes), jq | |
| # Installation: To install, just move into /usr/local/bin/ and make sure it has execute permissions | |
| set -e # halt on errors | |
| # Set script vars |
| #!/usr/bin/env bash | |
| # Reset Docker to a clean vanilla state. Will destroy all containers, images, networks, volumes, and cache. | |
| [ $(docker ps | wc -l) -ne 1 ] && echo "Stopping all containers..." && docker stop $(docker ps | sed -n '1d;p' | awk -F" " '{print $1}') | |
| [ $(docker ps -a | wc -l) -ne 1 ] && echo "Deleting all containers..." && docker rm $(docker ps -a | sed -n '1d;p' | awk -F" " '{print $1}') | |
| [ $(docker images | wc -l) -ne 1 ] && echo "Deleting all images..." && docker image rm $(docker images | sed -n '1d;p' | awk -F" " '{print $3}') | |
| echo "Pruning networks, volumes, and cache..." && docker system prune -a -f --volumes | |
| echo "Docker is back to Vanilla... COMPLETE!" |
| package main | |
| import ( | |
| "fmt" | |
| "encoding/json" | |
| "github.com/gorilla/mux" | |
| "log" | |
| "net/http" | |
| ) |
| #include <iostream> | |
| #include <thread> | |
| #include <windows.h> | |
| #include <conio.h> | |
| const WORD keyCodes[4] = { | |
| 0x51, // Q | |
| 0x57, // W | |
| 0x45, // E |
| git ls-files | xargs wc -l |
| #!/bin/sh | |
| # | |
| # Batch transcode mp4 files from a directory, | |
| # set bitrate, and output to another directory. | |
| # User-defined parameters | |
| INPUT_DIR="/home/user/Videos/pre" | |
| OUTPUT_DIR="/home/user/Videos/post" | |
| MEDIA_EXTENSION="mp4" | |
| TARGET_BITRATE_VIDEO="8M" |
| #/bin/bash | |
| # Get the Dependencies | |
| # Copy and paste the whole code box for each step. First install the dependencies: | |
| sudo apt-get update | |
| sudo apt-get -y install autoconf automake build-essential libass-dev libfreetype6-dev \ | |
| libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev \ | |
| libxcb-xfixes0-dev pkg-config texinfo zlib1g-dev |