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 Fibonacci | |
import "testing" | |
func TestFibonacci(t *testing.T) { | |
parameters := []struct { | |
input, expected int | |
}{ | |
{0, 0}, {1, 1}, {2, 1}, {3, 2}, {4, 3}, {5, 5}, {6, 8}, | |
} |
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 = rating_migration_cli | |
PACKAGE= github.com/gtforge/cli_rating | |
GOARCH=amd64 | |
define GRAPH_BODY | |
( echo "digraph G {" | |
go list -f '{{range .Imports}}{{printf "\t%q -> %q;\n" $$.ImportPath .}}{{end}}' $$(go list -f '{{join .Deps " "}}' github.com/gtforge/cli_rating) github.com/gtforge/cli_rating | |
echo "}" | |
) | dot -Tsvg -o deps.svg && firefox deps.svg | |
endef | |
export GRAPH_BODY |
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
/* | |
Find if one string out of a list exists in an array of strings | |
*/ | |
package main | |
import ( | |
"fmt" | |
"strings" | |
"time" | |
) |
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
#Find differences | |
git diff --stat --color GS-1702-migrate-bo-server-to-php-55..master | |
#Merge master | |
#git checkout [branch] | |
git merge --no-commit --no-ff master | |
git commit -am"merge master" | |
git push | |
#Merge brange |
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
echo date('Y-m-d', strtotime('last monday', strtotime('tomorrow'))); |
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" | |
) | |
func setCheck(data map[int]string) func(nidle int) (ret string) { | |
f := func(nidle int) (ret string) { | |
for key, val := range data { | |
if nidle%key == 0 { |