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" | |
"reflect" | |
) | |
func main() { | |
var m Foo = MyStruct{"test"} | |
_ = m.DoSmth() |
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 ( | |
"net" | |
"log" | |
"bufio" | |
"os" | |
"fmt" | |
) |
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 | |
while : | |
do | |
printf "$(date);$1\n" | |
sleep 2 | |
done |
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
func main() { | |
//ecs.Start(ecs.Configuration{FpsLimit: 30}, &MyScene{}) | |
// Load a TXT file. | |
f, _ := os.Open("a") | |
defer f.Close() | |
// Create a new reader. | |
r := csv.NewReader(bufio.NewReader(f)) | |
r.Comma = ';' | |
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
import ( | |
"fmt" | |
"github.com/fane89/gotron/ecs" | |
"github.com/fane89/gotron/ecs/systems" | |
"log" | |
"github.com/howeyc/fsnotify" | |
) | |
func main() { |
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 | |
GOOS=linux GOARCH=arm GOARM=7 go build . && \ | |
scp ${PWD##*/} pi@$1:~/bin/ |
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
server { | |
listen 80; | |
listen [::]:80; | |
server_name *.a.tech; | |
root /home/user/web; | |
location / { | |
} | |
} |
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 ( | |
"log" | |
"github.com/howeyc/fsnotify" | |
"path/filepath" | |
"os" | |
"flag" | |
"os/exec" |
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 ( | |
"bufio" | |
"os" | |
"io" | |
"log" | |
"fmt" | |
"flag" | |
"os/signal" |
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
export VISUAL=vim | |
export EDITOR="$VISUAL" | |
export HISTCONTROL=ignoredups:erasedups | |
export HISTSIZE=10000 | |
export PROMPT_COMMAND='history -a; history -r;echo -ne "\033]0;${PWD##*/}\007"' | |
green=$(tput setaf 2) | |
reset=$(tput sgr0) | |
PS1="\w \[$green\]$\[$reset\] " | |
stty -ixon |
OlderNewer