This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo -n "That's the text" | openssl enc -aes-256-cbc -md sha512 -pbkdf2 -iter 100000 -salt | openssl base64 > /tmp/a | |
Encrypt with interactive password. Encrypted message is base64-encoded afterwards. | |
cat /tmp/a | openssl base64 -d | openssl enc -aes-256-cbc -md sha512 -pbkdf2 -iter 100000 -salt -d | |
Base-64 decode and decrypt message with interactive password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## Copyright (C) 2009 Przemyslaw Pawelczyk <[email protected]> | |
## License: GNU General Public License v2, v3 | |
# | |
# Lockable script boilerplate | |
### HEADER ### | |
LOCKFILE="/var/lock/`basename $0`" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The .config() part is the relevant part, 'SomeModule' is arbitrary name, | |
// but this config() call goes on your main ng-app="YourAppModule" | |
// The PHP $_POST expects data w/ a form content type, not a JSON payload | |
angular.module("YourAppModule", ["SomeModule"]).config(function($httpProvider) { | |
$httpProvider.defaults.headers.put['Content-Type'] = | |
'application/x-www-form-urlencoded'; | |
$httpProvider.defaults.headers.post['Content-Type'] = | |
'application/x-www-form-urlencoded'; | |
}); |