You can run these commands to encrypt or decrypt a string:
To encrypt:
printf "Lorem ipsum dolor sit amet, ..." | \
openssl enc -e -base64 -A -pbkdf2 -aes-256-cbc -pass pass:"my-password"
| #!/bin/bash | |
| sudo add-apt-repository -y ppa:git-core/ppa | |
| sudo apt-get update | |
| sudo apt-get install git -y |
| angular.module('myMdl', []).config(['$httpProvider', function($httpProvider) { | |
| $httpProvider.responseInterceptors.push([ | |
| '$q', '$templateCache', 'activeProfile', | |
| function($q, $templateCache, activeProfile) { | |
| // Keep track which HTML templates have already been modified. | |
| var modifiedTemplates = {}; | |
| // Tests if there are any keep/omit attributes. | |
| var HAS_FLAGS_EXP = /data-(keep|omit)/; |
| Sql2o sql2o = new Sql2o(url, user, pass); | |
| // Get generated key from SERIAL column | |
| @Test | |
| public void testKeyKeyOnSerial() { | |
| String createTableSql = "create table test_serial_table (id serial primary key, val varchar(20))"; | |
| sql2o.createQuery(createTableSql).executeUpdate(); | |
| String insertSql = "insert into test_serial_table(val) values ('something')"; |
| { | |
| "directory": "components" | |
| } |
| import java.security.KeyPairGenerator; | |
| import java.security.KeyPair; | |
| import java.security.PrivateKey; | |
| import java.security.PublicKey; | |
| import java.security.KeyFactory; | |
| import java.security.spec.EncodedKeySpec; | |
| import java.security.spec.PKCS8EncodedKeySpec; | |
| import java.security.spec.X509EncodedKeySpec; | |
| import java.security.spec.InvalidKeySpecException; | |
| import java.security.NoSuchAlgorithmException; |
| # First install tmux | |
| brew install tmux | |
| # For mouse support (for switching panes and windows) | |
| # Only needed if you are using Terminal.app (iTerm has mouse support) | |
| Install http://www.culater.net/software/SIMBL/SIMBL.php | |
| Then install https://bitheap.org/mouseterm/ | |
| # More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/ |