- Project (Drupal) is served on
/var/www/html
in the Vagrant box - Local project files location:
c:\Users\username\Work\projects\my-project\repo\html
- Guest machine IP is 10.0.2.2 (if this doesn't work, run
route -nee
in the VM and look for the gateway address)
This file contains hidden or 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 | |
# Usage: create-cluster.sh user password port local-port space-separated-ips | |
user=$1 | |
password=$2 | |
port=$3 | |
localPort=$4 | |
ips=$5 |
This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"net/mail" | |
"net/smtp" | |
"strings" | |
) | |
var host = "127.0.0.1" |
This file contains hidden or 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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"log" | |
"net/http" | |
"strings" | |
"time" |
This file contains hidden or 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 | |
set -euo pipefail | |
openssl req -new -text -passout pass:abcd -subj /CN=localhost -out server.req -keyout privkey.pem | |
openssl rsa -in privkey.pem -passin pass:abcd -out server.key | |
openssl req -x509 -in server.req -text -key server.key -out server.crt | |
chmod 600 server.key | |
test $(uname -s) = Linux && chown 70 server.key | |
docker run -d --name postgres -e POSTGRES_HOST_AUTH_METHOD=trust -v "$(pwd)/server.crt:/var/lib/postgresql/server.crt:ro" -v "$(pwd)/server.key:/var/lib/postgresql/server.key:ro" postgres:12-alpine -c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key |
This file contains hidden or 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
https://webpack.github.io/docs/webpack-dev-server.html#api | |
If mocking API is needed when running webpack dev server, you can set it up in your webpack config as follows: | |
devServer: { | |
setup: function(app) { | |
// Here you can access the Express app object and add your own custom middleware to it. | |
// For example, to define custom handlers for some paths: | |
// app.get('/some/path', function(req, res) { | |
// res.json({ custom: 'response' }); | |
// }); | |
}, |
Notes from trainings giving at Eybeam (12/3/16), Free School/Escuelita Libre (1/14/17), Art is Labor (4/23/2017), and BUFU's digital security skillshare (7/11/2017)
- Signal home: https://whispersystems.org/
- How to install Signal on Android: https://ssd.eff.org/en/module/how-use-signal-android
- How to install Signal on iOS: https://ssd.eff.org/en/module/how-use-signal-ios
- Apple Explains Exactly How Secure iMessage Really Is: https://techcrunch.com/2014/02/27/apple-explains-exactly-how-secure-imessage-really-is/
This file contains hidden or 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
var data = { | |
"name": "root", | |
"contents": [ | |
{ | |
"name": "A", | |
"contents": [ | |
{ | |
"name": "fileA1", | |
"contents": [] | |
} |
This file contains hidden or 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
code () { | |
if [[ $# = 0 ]] | |
then | |
open -a "Visual Studio Code" -n | |
else | |
[[ $1 = /* ]] && F="$1" || F="$PWD/${1#./}" | |
open -a "Visual Studio Code" -n --args "$F" | |
fi | |
} |
This file contains hidden or 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
ON THE RPI (if you haven't downloaded openFrameworks) | |
$ cd | |
$ curl -O http://www.openframeworks.cc/versions/v0.8.4/of_v0.8.4_linuxarmv6l_release.tar.gz | |
$ mkdir openFrameworks | |
$ tar vxfz of_v0.8.4_linuxarmv6l_release.tar.gz -C openFrameworks --strip-components 1 | |
$ cd /home/pi/openFrameworks/scripts/linux/debian_armv6l | |
$ sudo ./install_dependencies.sh | |
ON THE MAC: |
NewerOlder