We want to forward messages using an intermediate rsync forwarder/broker. We do not want the broker to save any messages from the clients and we also want to forward the broker messages to the Rsyslog Sink.
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
#!/usr/bin/env bash | |
# create the base lint result | |
spectral lint --quiet --format json --output lint.json code/build/api-spec/openapi3.yaml | |
# process to code quality format | |
jq -c '[.[] | { description: .message, original: ., location: { path: .source, lines: { begin: .range.start.line }}}]' lint.json > base.json | |
jq -c '.[]' base.json | while read -r line ; do | |
sum=$(echo "$line" | md5sum | cut -d' ' -f1); |
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
#!/usr/bin/env bash | |
# Filename: ${filename} | |
# Description: ${filedesc} | |
# Maintainer: Lukas Ciszewski <lukas.ciszewski@gmail.com> | |
# set shell options | |
# * fail immediately on the first error occuring | |
# * allow clean trapping for ERR | |
# * fail also if the call to nested functions fails |
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/json" | |
"fmt" | |
) | |
type resp struct { | |
Fname string `json:"fname, string"` | |
} |
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
interface SubSystem { | |
public void startSystem(); | |
public void stopSystem(); | |
public SubSystemState getState(); | |
} | |
interface SubSystemState {} | |
enum Color { WHITE, BLACK, RED, BLUE, GREEN; } | |
enum EngineType { DIESEL, GASOLINE; } |
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 "os" | |
import "fmt" | |
import "time" | |
import "runtime/debug" | |
import "runtime/pprof" | |
var _ = os.Stdout | |
var _ = debug.PrintStack |
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
// Provide simple time measured factorial function versions | |
// * iterative | |
// * recursive | |
// * tail recursive | |
package main | |
import ( | |
"fmt" | |
"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
# some converge rest api | |
curl http://127.0.0.1:4774/api/v1/resources/modules/hello.hcl | |
curl http://127.0.0.1:4774/api/v1/resources/binary -H "Accept: text/plain" | shasum | |
# download converge binary | |
curl http://127.0.0.1:4774/api/v1/resources/binary -H "Accept: text/plain" -O | |
# use the binary | |
chmod +x binary | |
./binary |
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
$ python -c "import os; print('\n'.join(os.environ['PATH'].split(':')))" |
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
# users-formula/basic.sls | |
basic-user: | |
user.present: | |
- name: {{ name }} | |
- gid: {{ gid }} | |
############################ | |
# state tree: vhost-user.sls | |
include: |