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
| {{< tweet "Adding a \"Tweet this\" shortcode to Hugo, step-by-step tutorial" >}} |
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
| <blockquote class="tweet-this"> | |
| <p><a href="http://twitter.com/intent/tweet?url={{ .Page.Permalink }}&text="{{ .Get 0 }}"&via=TitPetric" target="_blank">"{{ .Get 0 }}" via @TitPetric</a></p> | |
| <a href="http://twitter.com/intent/tweet?url={{ .Page.Permalink }}&text="{{ .Get 0 }}"&via=TitPetric" target="_blank"><i class="fa fa-twitter"></i>Click to Tweet</a> | |
| </blockquote> |
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
| func parse(input io.Reader) (p *point, err error) { | |
| // handle read errors | |
| read := func(data interface{}) { | |
| if err == nil { | |
| err = binary.Read(input, binary.BigEndian, data) | |
| } | |
| } | |
| p := &point{} | |
| read(&p.Longitude) |
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
| #!/bin/bash | |
| if [ -z "$1" ]; then | |
| echo "Usage: $0 [start/stop]" | |
| exit 1 | |
| fi | |
| function setup_database { | |
| NAME="$1" | |
| DOCKERFILE="titpetric/percona-xtrabackup" | |
| docker run -d -h $NAME --name $NAME --net=party -e MYSQL_ROOT_PASSWORD="testing" $DOCKERFILE |
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
| package main | |
| import ( | |
| "strings" | |
| "testing" | |
| ) | |
| func BenchmarkStringReverseBad(b *testing.B) { | |
| b.ReportAllocs() |
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
| { | |
| "require": { | |
| "guzzlehttp/guzzle": "~6.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
| package main | |
| import ( | |
| "errors" | |
| "fmt" | |
| "go/parser" | |
| "go/token" | |
| "log" | |
| "os" | |
| "path/filepath" |
OlderNewer