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
# rc.conf | |
# set up two bridge interfaces for iocage | |
cloned_interfaces="bridge0 bridge1" | |
# join interfaces, add the private interface to bridge0 | |
ifconfig_bridge0="inet 10.1.1.254/24 addm vtnet1 up" | |
# public network | |
ifconfig_vtnet0="inet 37.97.135.78 netmask 255.255.255.0" |
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
Host * | |
ControlMaster auto | |
ControlPath ~/.ssh/sockets/%r@%h-%p | |
ControlPersist 600 |
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
extern crate iron; | |
use iron::prelude::{Request}; | |
struct Resource { | |
is_available: Box<Fn(Request) -> bool>, | |
} | |
fn defaultResource() -> Resource{ | |
Resource{is_available: Box::new(|_| true )} |
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
extern crate iron; | |
use iron::prelude::{Request}; | |
struct Resource { | |
is_available: fn(Request) -> bool | |
} | |
fn defaultResource() -> Resource { | |
Resource{is_available: |_| true} |
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
// FindOne returns a single thread in the API | |
func (a *AppContext) FindOne(c *echo.Context) error { | |
id := c.P(0) | |
thread, err := a.ThreadStorage.FindOne(id) | |
if err != nil { | |
return c.JSON(http.StatusNotFound, nil) | |
} | |
return c.JSON(http.StatusOK, thread) | |
} |
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
===> License MPL accepted by the user | |
===> Fetching all distfiles required by envconsul-0.5.0 for building | |
===> Extracting for envconsul-0.5.0 | |
=> SHA256 Checksum OK for envconsul_0.5.0_freebsd_amd64.tar.gz. | |
=========================================================================== | |
=======================<phase: patch-depends >============================ | |
=========================================================================== | |
=======================<phase: patch >============================ | |
===> Patching for envconsul-0.5.0 | |
=========================================================================== |
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
Host consulserver | |
Hostname 127.0.0.1 | |
Port 2222 | |
IdentityFile /home/<username>/.vagrant.d/insecure_private_key | |
User vagrant | |
StrictHostKeyChecking no | |
UserKnownHostsFile /dev/null | |
LocalForward 8500 localhost:8500 |
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
box: wercker/golang | |
build: | |
steps: | |
- setup-go-workspace | |
- script: | |
name: get dependencies | |
code: | | |
cd $WERCKER_SOURCE_DIR | |
go get -t ./... | |
- script: |
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
deploy: | |
steps: | |
- script: | |
name: tar | |
code: tar -czf $WERCKER_OUTPUT_DIR/$WERCKER_GIT_REPOSITORY-$(git rev-parse --short=7).tar.gz $WERCKER_SOURCE_DIR |
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
;; configuration | |
(add-hook 'go-mode-hook | |
'(lambda() | |
(setq c-basic-offset 4) | |
(setq tab-width 4) | |
(setq indent-tabs-mode t) | |
(local-set-key (kbd "M-.") 'godef-jump) | |
(local-set-key (kbd "C-c C-r") 'go-remove-unused-imports) | |
(local-set-key (kbd "C-c i") 'go-goto-imports) | |
(local-set-key (kbd "C-c d") 'godoc))) |