% curl \
-s 'https://awspolicygen.s3.amazonaws.com/js/policies.js' \
| sed 's#app.PolicyEditorConfig=##' \
| jq -r '.serviceMap[]|.StringPrefix as $prefix|.Actions[] | "\($prefix):\(.)"' \
| sort -u
a2c:GetContainerizationJobDetails
a2c:GetDeploymentJobDetails
a2c:StartContainerizationJob
a2c:StartDeploymentJob
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
#!/bin/bash | |
# date --date='TZ="UTC+4" 2016-08-22 10:37:44' "+%Y-%m-%d %H:%M:%S" | |
# Show date and time in other time zones | |
search=$1 | |
format='%a %F %T %z' | |
zoneinfo=/usr/share/zoneinfo |
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
import sys | |
import json | |
import requests | |
from pprint import pprint | |
def main() -> int: | |
if sys.argv[0] == 1: | |
print(f"Usage: {sys.argv[0]} <package==version>|<package>|<package> <version>") | |
return 1 |
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
$ cat <<EOF > reduce.jq | |
def pick($paths): | |
. as $root | reduce $paths[] as $path ({}; . + { ($path): $root[$path] }); | |
.ansible_facts | pick(["ansible_kernel", "ansible_distribution", "ansible_kernel_version"]) | |
EOF | |
$ ansible -m setup localhost | sed '1 s/^.*|.*=>.*$/{/g' | jq -f reduce.jq | |
{ | |
"ansible_kernel": "13.1-RELEASE-p3", |
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
define lsdev | |
set $dev = bus_data_devices->tqh_first | |
while ($dev != 0) | |
printf "%-20s ", $dev->nameunit | |
printf " %p", $dev->softc | |
print "\n" | |
set $dev = $dev->devlink.tqe_next | |
end | |
end |
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
$ cat test.c | |
#include <stdio.h> | |
void | |
test() __attribute__ ((section (".sbz"))) | |
{ | |
printf("Test called located in %p and section .sbz\n", &test); | |
} | |
int |
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
module github.com/sbz/pf-test | |
go 1.16 | |
require ( | |
github.com/go-freebsd/kld v0.0.0-20170326221633-78f2bd4a5544 // indirect | |
github.com/go-freebsd/pf v0.0.0-20190318053615-719aae74de40 | |
github.com/stretchr/testify v1.7.0 // indirect | |
) |
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
diff --git c/cmd/crowdsec-cli/machines.go w/cmd/crowdsec-cli/machines.go | |
index bbdf11c..33e87e9 100644 | |
--- c/cmd/crowdsec-cli/machines.go | |
+++ w/cmd/crowdsec-cli/machines.go | |
@@ -7,6 +7,7 @@ import ( | |
"io/ioutil" | |
"math/big" | |
"os" | |
+ "runtime" | |
"strings" |
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 python | |
import sys | |
import subprocess | |
import socket | |
import shlex | |
NTPQ_BIN='/usr/bin/ntpq' | |
METRICS=[ |
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
#!/bin/bash | |
set -o errexit | |
set -o nounset | |
set -o pipefail | |
readonly TF_VERSION="v0.11" | |
output_line() { |
NewerOlder