This file contains 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
package main | |
import ( | |
"fmt" | |
"github.com/ugorji/go/codec" | |
"gopkg.in/vmihailenco/msgpack.v2" | |
) | |
type TestStruct struct { | |
Num float32 |
This file contains 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
package main | |
import ( | |
"fmt" | |
"github.com/algrebe/cobra" | |
) | |
func getFunc(msg string) func(*cobra.Command, []string) { | |
return func(cmd *cobra.Command, args []string) { | |
fmt.Printf("%s with args %v\n", msg, args) |
This file contains 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
package main | |
import ( | |
"fmt" | |
"github.com/spf13/cobra" | |
) | |
func getFunc(msg string) func(*cobra.Command, []string) { | |
return func(cmd *cobra.Command, args []string) { | |
fmt.Printf("%s with args %v\n", msg, args) |
This file contains 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
package main | |
import ( | |
"fmt" | |
"runtime" | |
"time" | |
) | |
func do() { | |
for { |
This file contains 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
# -*- coding: UTF-8 -*- | |
raw_data = """ | |
<?xml version="1.0" encoding="ISO-8859-2"?> | |
<rss version="2.0"> | |
<channel> | |
<link>http://forum.gazeta.pl</link> |
This file contains 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
// resource allocation server | |
/* | |
put in resources with tags such as | |
{ "ID": "some-id", "tags": []string{ "computer", "windows" } } | |
and if you want a computer that does not use windows | |
query for a resource using a string such as "+computer -windows" | |
*/ | |
package resalloc | |
import ( |
This file contains 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
# output for https://github.com/wtolson/gnsq/issues/12 | |
$ bash run.sh nsq-0.3.8.linux-amd64.go1.6.2/bin/ | |
[nsqd] 2016/10/28 12:00:04.257878 nsqd v0.3.8 (built w/go1.6.2) | |
[nsqd] 2016/10/28 12:00:04.258187 ID: 433 | |
[nsqd] 2016/10/28 12:00:04.258302 NSQ: persisting topic/channel metadata to nsqd.433.dat | |
[nsqd] 2016/10/28 12:00:04.262666 TCP: listening on [::]:4150 | |
[nsqd] 2016/10/28 12:00:04.263643 HTTP: listening on [::]:4151 | |
2016/10/28 12:00:06 INF 1 [TestTopic/default] (127.0.0.1:4150) connecting to nsqd | |
[nsqd] 2016/10/28 12:00:06.256774 TCP: new client(127.0.0.1:53323) |
This file contains 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
{"color": "bfd4f2", "name": "Effort: High"} | |
{"color": "f9d0c4", "name": "Effort: Low"} | |
{"color": "0e8a16", "name": "Effort: Medium"} | |
{"color": "1d76db", "name": "Impact: High"} | |
{"color": "0e8a16", "name": "Impact: Low"} | |
{"color": "bfdadc", "name": "Impact: Medium"} | |
{"color": "159818", "name": "Status: Help wanted", "old_name": "help wanted"} | |
{"color": "ededed", "name": "Status: In progress", "old_name": "in progress"} | |
{"color": "e6e6e6", "name": "Status: Needs review", "old_name": "needs review"} | |
{"color": "e5987b", "name": "Status: Needs revision"} |
This file contains 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
#!/bin/bash | |
venvs=$HOME/.venv3 | |
mkdir -p $venvs | |
venv3_mk() { | |
if [ "$#" -ne 1 ] | |
then | |
echo "Usage: venv3_mk <venv_name>" | |
return 1 |