Skip to content

Instantly share code, notes, and snippets.

View akutz's full-sized avatar

Andrew Kutz akutz

View GitHub Profile
@akutz
akutz / semaphore.go
Created April 25, 2016 16:32
Golang Semaphores
package semaphore
import (
"time"
)
// Semaphore enables processes and threads to synchronize their actions.
type Semaphore interface {
// Close closes the semaphore.
{
"docker.availabilityzone": "",
"docker.fstype": "ext4",
"docker.iops": "",
"docker.size": "",
"docker.volumetype": "",
"libstorage": {
"logging": {
"httpRequests": true,
"httpResponses": true
rexray:
libstorage:
host: tcp://127.0.0.1:7979
embedded: true
driver: vfs
service: vfs
phase description
validate validate the project is correct and all necessary information is available.
initialize initialize build state, e.g. set properties or create directories.
generate-sources generate any source code for inclusion in compilation.
process-sources process the source code, for example to filter any values.
generate-resources generate resources for inclusion in the package.
process-resources copy and process the resources into the destination directory, ready for packaging.
compile compile the source code of the project.
process-classes post-process the generated files from compilation, for example to do bytecode enhancement on Java classes.
[diff]
tool = diffmerge
[difftool "diffmerge"]
cmd = diffmerge \"$LOCAL\" \"$REMOTE\"
[merge]
tool = diffmerge
[mergetool "diffmerge"]
cmd = "diffmerge --merge --result=\"$MERGED\" \"$LOCAL\" \"$(if test -f \"$BASE\"; then echo \"$BASE\"; else echo \"$LOCAL\"; fi)\" \"$REMOTE\""
trustExitCode = true
[alias]
[1]akutz@pax:libstorage$ make info
Project Import Path.........github.com/emccode/libstorage
Project Name................libstorage
OS / Arch...................darwin_amd64
Vendored....................0
Sources.....................libstorage.go
api/api.go
api/api_generated.go
api/client/client.go
api/client/client_api_funcs.go
libstorage:
host: tcp://127.0.0.1:7979
logging:
level: warn
integration:
volume:
create:
default:
size: 1 # GB
server:
var twoFiddySixBoundaries = []uint16{
0,
256,
512,
768,
1024,
1280,
1536,
1792,
2048,
@akutz
akutz / rexray-volume-debug.sh
Created June 13, 2016 15:00
Listing volumes with REX-Ray using debug logging
$ rexray volume -l debug
DEBU[0000] updated log level logLevel=debug
DEBU[0000] os.args time=1465829973 val=[rexray volume -l debug]
DEBU[0000] activating libStorage cmd=volume time=1465829973
DEBU[0000] created scoped scope new=rexray parentScopes=rexray.modules.default-docker,
DEBU[0000] initializing default libStorage services driver=virtualbox time=1465829973
DEBU[0000] initialized default libStorage services driver=virtualbox time=1465829973
DEBU[0000] starting embedded libStorage server time=1465829973
DEBU[0000] created scoped scope new=libstorage.server parentScopes=rexray,rexray.modules.default-docker,
INFO[0000] configured logging libstorage.logging.level=debug server=sprinkle-fighter-au time=1465829973
@akutz
akutz / rexray_vagrant_up_00_new.sh
Last active June 19, 2016 22:46
REX-Ray with Vagrant and VirtualBox
[0]akutz@pax:rexray$ vagrant up
Bringing machine 'node0' up with 'virtualbox' provider...
Bringing machine 'node1' up with 'virtualbox' provider...
==> node0: Importing base box 'ubuntu/trusty64'...
==> node0: Matching MAC address for NAT networking...
==> node0: Checking if box 'ubuntu/trusty64' is up to date...
==> node0: Setting the name of the VM: rexray_node0_1466375654151_65293
==> node0: Clearing any previously set forwarded ports...
==> node0: Clearing any previously set network interfaces...
==> node0: Preparing network interfaces based on configuration...