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 | |
# REPO_NAME=<repo>.git | |
# ORIGIN_URL=git@<host>:<project>/$REPO_NAME | |
# REPO1_URL=git@<host>:<project>/$REPO_NAME | |
rm -rf $REPO_NAME | |
git clone --bare $ORIGIN_URL | |
if [ "$?" != "0" ]; then | |
echo "ERROR: failed clone of $ORIGIN_URL" |
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 | |
// Require pcscd, libpcsclite | |
import ( | |
"bufio" | |
"bytes" | |
"fmt" | |
"io/ioutil" | |
"os" | |
"strconv" |
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/pallat/queue" | |
) | |
type lot struct { | |
items []int |
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" | |
) | |
type slice []int | |
type loopFn func(int) | |
func (a *slice) forEach(fn loopFn) { |
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 ( | |
"encoding/xml" | |
"fmt" | |
"log" | |
) | |
type Password struct { | |
Type string `xml:"Type,attr"` |
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" | |
type car interface { | |
color() string | |
model() string | |
} | |
type toyota struct{} |
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 | |
type presenter interface { | |
method() interface{} | |
} | |
type doing func() interface{} | |
func (d doing) method() interface{} { | |
return d() |