A super simple redux example, originally posted by Dan Abramov
Usage:
node simple-redux.js
| import javax.net.ssl.*; | |
| import java.io.*; | |
| import java.security.KeyStore; | |
| public class TrustSelfSignedCert { | |
| public static void main(String[] args) throws Exception { | |
| FileInputStream is = new FileInputStream("path/to/self-signed-cert.crt"); | |
| // Create a KeyStore containing our trusted CAs | |
| KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType()); | |
| ks.load(null, null); | |
| ks.setCertificateEntry("selfsigned", CertificateFactory.getInstance("X.509").generateCertificate(is)); |
| const https = require('https'); | |
| const fs = require('fs'); | |
| const options = { | |
| hostname: 'example.com', | |
| port: 443, | |
| path: '/', | |
| method: 'GET', | |
| ca: fs.readFileSync('path/to/self-signed-cert.pem') | |
| }; |
A super simple redux example, originally posted by Dan Abramov
Usage:
node simple-redux.js
| perl -pi -w -e 's/<out>/<in>/g;' ./**/*.* |
This is a tall desk; shorter people may want to consider cutting two 1x4 units into 1x2 units (since a top and bottom panel are needed for each 1x2 unit) to replace the 2x2 units and adding legs or casters, but I'm not sure if the internal construction of the Kallax units would support that. Or, you know, stand on a platform. Don't forget your anti-fatigue mat!
| # Compiled source # | |
| ################### | |
| *.com | |
| *.class | |
| *.dll | |
| *.exe | |
| *.o | |
| *.so | |
| # Packages # |
| npm --version #2.1.11 | |
| npm install -g npm@latest | |
| npm --version #2.7.3 | |
| # if npm ERR! UNABLE_TO_VERIFY_LEAF_SIGNATURE | |
| npm config set strict-ssl false |
| # Make sure you're in script's actual working directory, not the dir you called it from. | |
| # See: http://stackoverflow.com/a/16349776/741892 | |
| cd ${0%/*} |
| #!/bin/bash | |
| function symlink() { | |
| SRC=$1 | |
| DST=$2 | |
| # Remove old dest. | |
| rm -f "$DST" | |
| # Symlink | |
| ln -s "$SRC" "$DST" | |
| } |