I use Namecheap.com as a registrar, and they resell SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
| #!/bin/bash | |
| # bash generate random alphanumeric string | |
| # | |
| # bash generate random 32 character alphanumeric string (upper and lowercase) and | |
| NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
| # bash generate random 32 character alphanumeric string (lowercase only) | |
| cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1 |
| # /etc/nginx/sites-enabled/magento | |
| server { | |
| listen 80; | |
| server_name ec2-184-72-68-219.compute-1.amazonaws.com; | |
| root /var/www/magento/; | |
| access_log /var/log/nginx/magento-access_log; | |
| error_log /var/log/nginx/magento-error_log; | |
| location / { |
I use Namecheap.com as a registrar, and they resell SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
Remove the first 2m 54.583s of input.mp3 and save as output.mp3
ffmpeg -i input.mp3 -ss 00:02:54.583 -acodec copy output.mp3
| !^ first argument | |
| !$ last argument | |
| !* all arguments | |
| !:2 second argument | |
| !:2-3 second to third arguments | |
| !:2-$ second to last arguments | |
| !:2* second to last arguments | |
| !:2- second to next to last arguments | |
| !:0 command |
On the receiving end running
nc -l -p 1234 > out.file
will begin listening on port 1234.
On the sending end running
nc -w 3 [destination] 1234 < out.file
| # Add to .bashrc | |
| # Sauce: http://faq.i3wm.org/question/150/how-to-launch-a-terminal-from-here/ | |
| # Commands to be executed before the prompt is displayed | |
| # Save current working dir | |
| PROMPT_COMMAND='pwd > "${XDG_RUNTIME_DIR}/.cwd"' | |
| # Change to saved working dir | |
| [[ -f "${XDG_RUNTIME_DIR}/.cwd" ]] && cd "$(< ${XDG_RUNTIME_DIR}/.cwd)" |
| navigation without arrow keys: | |
| C-p, C-n, C-f, C-b | |
| (previous, next, forward, backward) | |
| navigating faster: | |
| C-a, C-e, A-f, A-b | |
| ("anfang" ;-), end, forward, backward) | |
| editing without remote keys: | |
| C-h |
| #!/bin/bash | |
| i3status | while : | |
| do | |
| read line | |
| dir=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd) | |
| spotify_status=$(dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'PlaybackStatus' | tail -n1 | cut -d'"' -f2) | |
| spotify_artist=$(dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata' | awk -f ${dir}/spotify_song.awk | head -n 1 | cut -d':' -f2) | |
| spotify_song=$(dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata' | awk -f ${dir}/spotify_song.awk | tail -n 1 | cut -d':' -f2) |
| # Encrypt | |
| tar cz folder_to_encrypt | \ | |
| openssl enc -aes-256-cbc -e > out.tar.gz.enc | |
| # Decrypt | |
| openssl enc -aes-256-cbc -d -in out.tar.gz.enc | tar xz | |
| # Consider using -pbkdf2 instead of -aes-256-cbc for slower but more secure encryption |