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:
""" | |
Connection adapter for Requests that allows it to talk with raw UNIX sockets. | |
Adapted from requests-unixsocket, which itself was adapted from docker-py. | |
https://github.com/msabramo/requests-unixsocket | |
https://github.com/docker/docker-py/blob/master/docker/unixconn/unixconn.py | |
""" | |
import socket | |
from urllib.parse import unquote, urlparse |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
/* Prelude.cs : What happens when a haskell programmer learns C#. | |
Copyright (c) 2011 Clark Gaebel | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the "Software"), | |
to deal in the Software without restriction, including without limitation | |
the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
and/or sell copies of the Software, and to permit persons to whom the | |
Software is furnished to do so, subject to the following conditions: |