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 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
| ################################################################### | |
| Writing C software without the standard library | |
| Linux Edition | |
| ################################################################### | |
| There are many tutorials on the web that explain how to build a | |
| simple hello world in C without the libc on AMD64, but most of them | |
| stop there. | |
| I will provide a more complete explanation that will allow you to | |
| build yourself a little framework to write more complex programs. |
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
| #!/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 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
| #!/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 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 ( | |
| "encoding/json" | |
| "fmt" | |
| ) | |
| type resp struct { | |
| Fname string `json:"fname, string"` | |
| } |
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
| 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 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 "os" | |
| import "fmt" | |
| import "time" | |
| import "runtime/debug" | |
| import "runtime/pprof" | |
| var _ = os.Stdout | |
| var _ = debug.PrintStack |
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
| // Provide simple time measured factorial function versions | |
| // * iterative | |
| // * recursive | |
| // * tail recursive | |
| package main | |
| import ( | |
| "fmt" | |
| "time" | |
| ) |
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
| # 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 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
| $ python -c "import os; print('\n'.join(os.environ['PATH'].split(':')))" |
NewerOlder