I hereby claim:
- I am theckman on github.
- I am theckman (https://keybase.io/theckman) on keybase.
- I have a public key whose fingerprint is 0E1A FA42 36D5 AD6E 2530 58DF C49E B0B2 3849 2FC1
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| func (t *TestSuite) TestAddTag(c *C) { | |
| c.Assert(len(t.g.Tags), Equals, 0) | |
| t.g.AddTag("test") | |
| c.Assert(len(t.g.Tags), Equals, 1) | |
| c.Check(t.g.Tags[0], Equals, "test") | |
| t.g.AddTag("test2") | |
| t.g.AddTag("test") // verify tags are de-duped | |
| c.Assert(len(t.g.Tags), Equals, 2) |
| package main | |
| import ( | |
| "fmt" | |
| "io/ioutil" | |
| "os" | |
| "github.com/go-chef/chef" | |
| ) |
| # frozen_string_literal: true | |
| require 'kitchen' | |
| require 'foodcritic' | |
| require 'rubocop/rake_task' | |
| require 'jsonlint/rake_task' | |
| require 'yamllint/rake_task' | |
| require 'rspec/core/rake_task' | |
| # set up test-kitchen |
| func doWork(s string, ch <-chan struct{}, wg *sync.WaitGroup) { | |
| defer func() { | |
| <-ch // free up space in the semaphore | |
| wg.Done() // tell the WaitGroup we're finished | |
| }() | |
| fmt.Println(s) | |
| } | |
| func execute(work []string) { |
| # ------------------------------------------------ | |
| # Config files are located in /etc/wireguard/wg0 | |
| # ------------------------------------------------ | |
| # ---------- Server Config ---------- | |
| [Interface] | |
| Address = 10.10.0.1/24 # IPV4 CIDR | |
| Address = fd86:ea04:1111::1/64 # IPV6 CIDR | |
| PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -A FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE # Add forwarding when VPN is started | |
| PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; ip6tables -D FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE # Remove forwarding when VPN is shutdown |