Create self signed certificate:
openssl req -new -x509 -sha256 -newkey rsa:2048 -nodes -keyout server.key -days 365 -out server.crtCreate new key:
openssl genrsa -out server.key 2048| #!/bin/bash | |
| # Disables the Universal Access Sticky Keys on Ubuntu, add this line e.g. to the Startup Applications | |
| ( sleep 60 && gsettings set org.gnome.desktop.a11y.keyboard stickykeys-enable false )& |
| #!/bin/sh | |
| # This program has two feature. | |
| # | |
| # 1. Create a disk image on RAM. | |
| # 2. Mount that disk image. | |
| # | |
| # Usage: | |
| # $0 <dir> <size> | |
| # |
Install syncthing:
brew install syncthingCreate file /Users/passuf/Library/LaunchAgents/net.syncthing.osx.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd >| *.aux | |
| *.glo | |
| *.idx | |
| *.log | |
| *.toc | |
| *.ist | |
| *.acn | |
| *.acr | |
| *.alg | |
| *.bbl |
| # Ubuntu 14.04 and 14.10 | |
| sudo apt-get install libav-tools | |
| mkdir mp3 && for f in *.flac; do avconv -i "$f" -ab 320k -map_metadata 0 -id3v2_version 3 mp3/"${f%.*}".mp3; done | |
| # To convert m4a files into mp3 | |
| mkdir mp3 && for f in *.m4a; do avconv -i "$f" -ab 320k -map_metadata 0 -id3v2_version 3 mp3/"${f%.*}".mp3; done | |
| # Other Ubuntu versions with ffmpeg available | |
| sudo apt-get install ffmpeg | |
| mkdir mp3 && for f in *.flac; do ffmpeg -i "$f" -ab 320k -map_metadata 0 -id3v2_version 3 mp3/"${f%.*}".mp3; done |
Prerequisites : the letsencrypt CLI tool
This method allows your to generate and renew your Lets Encrypt certificates with 1 command. This is easily automatable to renew each 60 days, as advised.
You need nginx to answer on port 80 on all the domains you want a certificate for. Then you need to serve the challenge used by letsencrypt on /.well-known/acme-challenge.
Then we invoke the letsencrypt command, telling the tool to write the challenge files in the directory we used as a root in the nginx configuration.
I redirect all HTTP requests on HTTPS, so my nginx config looks like :
server {
| # Add these commands to your ~/.xprofile file | |
| /usr/local/bin/map_logitech_r400_keys_exec & | |
| /usr/local/bin/file-inotify /tmp/logitech-r400.lock /usr/local/bin/map_logitech_r400_keys_exec & |
| #!/bin/bash | |
| dir="$1" | |
| # No directory has been provided, use current | |
| if [ -z "$dir" ] | |
| then | |
| dir="`pwd`" | |
| fi |