Problem 1: Nothing but the Truth [Elementary]
trueProblem 2: Simple Math [Elementary]
4| package main | |
| import ( | |
| "unicode/utf8" | |
| ) | |
| type Item string | |
| type Stream chan Item | |
| type Acc string |
| // Traverses an arbitrary struct and translates all stings it encounters | |
| // | |
| // I haven't seen an example for reflection traversing an arbitrary struct, so | |
| // I want to share this with you. If you encounter any bugs or want to see | |
| // another example please comment. | |
| // | |
| // The MIT License (MIT) | |
| // | |
| // Copyright (c) 2014 Heye Vöcking | |
| // |
| # Using lvm thin provisioning, per https://github.com/lxc/lxc/pull/67 | |
| # First we create a volume group to hold the thin pool | |
| $ sudo vgcreate lxc /dev/sde3 | |
| # Then create a thin-pool named 'tp' within that volume group | |
| $ sudo lvcreate -l 90%VG --type thin-pool --thinpool tp lxc |
| This demonstrates how to make client side certificates with go | |
| First generate the certificates with | |
| ./makecert.sh test@test.com | |
| Run the server in one terminal | |
| go run server.go |
| package main | |
| import ( | |
| "errors" | |
| "fmt" | |
| "os" | |
| "github.com/google/cayley" | |
| "github.com/google/cayley/graph" | |
| _ "github.com/google/cayley/graph/bolt" |
| // Meetup is a micro proxy program that enables to connect two endpoints via TCP sockets. | |
| // Either of endpoint may listen or connect. | |
| // | |
| // Example usage: | |
| // - you have a faulty PHP application and you want to debug it with xdebug | |
| // - xdebug can connect to your machine:9000, but you are behind NAT | |
| // - so you run `meetup -listen1=:9000 -listen2=:9001` on the application server | |
| // - and another `meetup -connect1=appserver:9001 -connect=localhost:9000` on your machine | |
| // First instance listens two ports and when a connection arrives on both, it creates | |
| // a bidirectional buffered pipe between the two. The other instance connects to |