`
- Website: https://stimulusjs.org/
- GitHub repo: https://github.com/stimulusjs/stimulus
- Handbook: https://stimulusjs.org/handbook/introduction
- Discourse: https://discourse.stimulusjs.org/
`
#!/usr/bin/env bash | |
set -Eeuo pipefail | |
trap cleanup SIGINT SIGTERM ERR EXIT | |
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
usage() { | |
cat <<EOF | |
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
job "grafana" { | |
datacenters = ["dc1"] | |
type = "service" | |
group "grafana" { | |
count = 1 | |
restart { | |
attempts = 10 | |
interval = "5m" |
package main | |
import ( | |
"context" | |
"flag" | |
log "github.com/sirupsen/logrus" | |
"gopkg.in/olivere/elastic.v6" | |
"os" | |
"strings" | |
"time" |
version: "3" | |
services: | |
postgress: | |
.... | |
healthcheck: | |
test: ["CMD-SHELL", "pg_isready -U postgres"] | |
interval: 10s | |
timeout: 5s | |
retries: 5 | |
app: |
initialize
: once, when the controller is first instantiatedconnect
: anytime the controller is connected to the DOMpackage main | |
import ( | |
"bufio" | |
"errors" | |
"fmt" | |
"os" | |
"strconv" | |
"strings" | |
) |
This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.
While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.
Run go install
and
gogitlocalstats -add /path/to/folder
will scan that folder and its subdirectories for repositories to scangogitlocalstats -email your@email.com
will generate a CLI stats graph representing the last 6 months of activity for the passed email. You can configure the default in main.go
, so you can run gogitlocalstats
without parameters.Being able to pass an email as param makes it possible to scan repos for collaborators activity as well.