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 -e | |
| NETNS_FILE=/var/run/netns/mynet | |
| MNTNS_FILE=/var/run/ns/mynet_mnt | |
| if [[ ! -f $NETNS_FILE ]]; then | |
| ip netns add mynet | |
| ip link add mynet0 type veth peer name mynet1 | |
| ip link set mynet0 up |
| #!/usr/bin/python | |
| # based on: https://gist.github.com/sgk/1286682 | |
| text = """ | |
| """ | |
| import datetime | |
| import re |
| git fetch <remote> <rbranch>:<lbranch> | |
| git checkout <lbranch> |
| #!/usr/bin/python | |
| # vim:set fileencoding=utf-8 sw=2 ai: | |
| # downloaded from https://gist.github.com/tcchau/4628317 | |
| # ... which is a fork from https://gist.github.com/sgk/1286682 | |
| import sqlite3 | |
| import datetime | |
| import re | |
| # additional imports --ah |
| /** | |
| * Compile with -D_GNU_SOURCE | |
| * Note: we're using static keys here and we don't plan to add | |
| * new items to the table. In such case using a perfect | |
| * hash generator (e.g, gperf) would clearly outperform | |
| * this simple example w/ the cost of first running gperf | |
| * (and other tradeoff that must be considered) | |
| * | |
| * Note: it's up to you to manage those resources contained in | |
| * the hash table. Also, hsearch does NOT provide a |
| # Install | |
| # via http://askubuntu.com/questions/510056/how-to-install-google-chrome | |
| wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
| sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' | |
| sudo apt-get update | |
| sudo apt-get install google-chrome-stable | |
| # Update |
| ## Sets up Graylog2 on Ubuntu | |
| # Variables | |
| ELASTICACHE_VERSION=0.90.10 | |
| GRAYLOG2_VERSION=0.20.6 | |
| GRAYLOG2_WEB_VERSION=0.20.6 | |
| GRAYLOG2_PORT=12900 | |
| GRAYLOG2_WEB_PORT=9000 | |
| PASSWORD=password |
| #!/bin/bash | |
| # usage ./notify.sh [path to folder] [command line to execute on change] | |
| while true | |
| do | |
| set -e | |
| inotifywait -q -r --exclude ".git|.idea" -e close_write,moved_to,create $1 > /dev/null | |
| set +e | |
| eval ${*:2} |
| //From http://stackoverflow.com/questions/25384796/can-i-set-gulp-livereload-to-run-after-all-files-are-compiled | |
| var gulp = require('gulp'); | |
| var jade = require('gulp-jade'); | |
| var gutil = require('gulp-util'); | |
| var stylus = require('gulp-stylus'); | |
| var jeet = require('jeet'); | |
| var nib = require('nib'); | |
| var uglify = require('gulp-uglify'); | |
| var livereload = require('gulp-livereload'); |