In one terminal:
PORT=7777 go run main.go
In a separate terminal:
PORT=7778 JOIN=localhost:7777 go run main.go
Repeat as desired with additional ports, JOIN
can point to one or more (comma-separated) existing nodes
In one terminal:
PORT=7777 go run main.go
In a separate terminal:
PORT=7778 JOIN=localhost:7777 go run main.go
Repeat as desired with additional ports, JOIN
can point to one or more (comma-separated) existing nodes
#!/bin/bash | |
## | |
## A simple little shell script that will return the current | |
## fingerprint on the SSL certificate and replace it in | |
## pianobar's config file automatically | |
## | |
## Author: William Jacoby (bonelifer) <> | |
## | |
## Base on the Github Gist by Bob Saska at: https://gist.github.com/r35krag0th/4173333 | |
## |
#!/bin/bash | |
set -e | |
set -x | |
FDNS_HOSTS_FILE=${1:-.fdns} | |
FDNS_HOSTS_KEY=$(echo $FDNS_HOSTS_FILE | sed 's/[^a-zA-Z0-9]//g') | |
echo updating $FDNS_HOSTS_KEY block |
I hereby claim:
To claim this, I am signing this object:
DRY-RUN: Listing [405] tests that would have run | |
com.joyent.manta.client.MantaClientDirectoriesIT.canCreateDirectory | |
com.joyent.manta.client.MantaClientDirectoriesIT.canDeleteDirectory | |
com.joyent.manta.client.MantaClientDirectoriesIT.canRecursivelyCreateDirectory | |
com.joyent.manta.client.MantaClientDirectoriesIT.directoryIsMarkedAsSuch | |
com.joyent.manta.client.MantaClientDirectoriesIT.noErrorWhenWeOverwriteAnExistingFile | |
com.joyent.manta.client.MantaClientDirectoriesIT.willReturnFalseWhenWeOverwriteDirectory | |
com.joyent.manta.client.MantaClientDirectoriesIT.wontErrorWhenWeCreateOverAnExistingDirectory | |
com.joyent.manta.client.MantaClientErrorIT.badHomeDirectory | |
com.joyent.manta.client.MantaClientErrorIT.fileNotFoundWithContent |
If you run App.java with the "all" argument you should get no errors. "all-with-serialization" also works because the pointer-to-native-memory that gets serialized is still valid as long as the JVM doesn't terminate.
If you run App.java once with "initiate" and then subsequently with "complete" you will receive the following exception only if libnss is in use:
Exception in thread "main" com.esotericsoftware.kryo.KryoException: Error during Java deserialization.
Serialization trace:
sessionRef (sun.security.pkcs11.Session)
session (sun.security.pkcs11.SessionKeyRef)
sessionKeyRef (sun.security.pkcs11.P11Key$P11SecretKey)
package co.tjcelaya.sandbox; | |
import com.joyent.manta.config.*; | |
import java.lang.reflect.InvocationTargetException; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.Map; | |
public class App { |
package co.tjcelaya.sandbox; | |
import com.joyent.manta.client.MantaClient; | |
import com.joyent.manta.client.MantaObjectResponse; | |
import com.joyent.manta.client.crypto.AesCtrCipherDetails; | |
import com.joyent.manta.client.crypto.SecretKeyUtils; | |
import com.joyent.manta.config.*; | |
import com.joyent.manta.http.MantaHttpHeaders; | |
import org.apache.commons.io.IOUtils; |
function aq { | |
# provide the column number ($1) to awk, and optionally the column separator ($2) | |
local fs=$( [ $# -ge 2 ] && echo "-F'$2'") | |
eval awk "$fs" "'{print \$$1}'" | |
} | |
function port-clear { | |
# slaughter whatever process is on port number ($1) | |
netstat -plnt | grep ":$1" | awk '{ split($NF,pd,"/"); print pd[1] }' | xargs kill -9 |