- https://ebpf.io/blog/ebpf-summit-wrapup/
- https://docs.ebpf.io/linux/
- https://eunomia.dev/en/tutorials/34-syscall/
- https://www.oreilly.com/library/view/learning-ebpf/9781098135119/ch04.html
- https://cilium.isovalent.com/hubfs/Learning-eBPF%20-%20Full%20book.pdf
- https://blogs.oracle.com/linux/post/bpf-a-tour-of-program-types
- Some sample bpf programs: https://elixir.bootlin.com/linux/v6.6.46/source/samples/bpf
- https://ebpf.io/books/buzzing-across-space-illustrated-childrens-guide-to-ebpf.pdf (it has nice pictures...)
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
from sagemaker.predictor import Predictor | |
from sagemaker.serializers import JSONSerializer | |
from sagemaker.deserializers import JSONDeserializer | |
existing_predictor_name = 'meta-textgeneration-llama-guard-7b-2024-05-02-10-26-28-687' | |
predictor_llm = Predictor( | |
existing_predictor_name, | |
serializer=JSONSerializer(), | |
deserializer= JSONDeserializer() |
- Architecture Threat modelling: https://partyrock.aws/u/testinguser883/R4PI1UIc2/Architecture-Threat-Modeler
- Speaker Spotlight: https://partyrock.aws/u/ChloeMcA/8_LQK-Hqq/SpeakerSpotlight/snapshot/9nkN1GQr_
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
# pip install awscurl | |
export COLLECTION_ID=j04odjdwa8f5xxxxxxxx | |
export OPENSEARCHHOST=`aws opensearchserverless batch-get-collection --ids ${COLLECTION_ID} | jq '.collectionDetails[] | .dashboardEndpoint'` | |
# Delete all indexes that follow a specific pattern | |
delete_old_indexes() { | |
# TARGETDATE should look like YYYY.MM.DD where date is 1 month before now. | |
export TARGETDATE=`date -d "-1 month" +"%Y.%m.%d"` | |
export INDEXLIST=$(awscurl --service aoss "${OPENSEARCHHOST}/_cat/indices" | grep ocsf | grep ${TARGETDATE} | awk '{print $1}') | |
echo "${INDEXLIST}" | while read index; do awscurl --service aoss -X DELETE "${OPENSEARCHHOST}/${index}"; done |
This is a customized snippet using Vega.
The original idea is from https://github.com/aws-solutions/centralized-logging-with-opensearch, but this is customised to consume OCSF logs injected into Security Lake
Some tips:
- To debug Vega scripts, you can use
VEGA_DEBUG.view.data('rawData')
into your browser console to retrieve the data in rawData (look at the beginning of the file above) - Not sure how to programatically inject this code, but if you need to create this in your own dashboard, you can add a new visualization as Vega, and copy and paste the code above.
In MacOS, you can do dig whatever.local
and get some results if you have the entry in a local DNS (like pi-hole) but curl, or browsing will fail.
This is because Apple enforces that .local domain is only discovered by the mDNS Bonjour service (more info)
To solve this, I decided to run the avahi-daemon in my local Raspberry-pi to publish additional services.
I decided to use the avahi-aliases project to simplify publishing more than one service on the same IP as the default avahi-daemon doesn't allow this at the moment
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
from datetime import datetime, timedelta | |
# Every day of the week (starting from tomorrow) for the past 50 weeks | |
now = datetime.now() + timedelta(days=1) | |
for i in range (50): | |
delta = timedelta(days=7*i) | |
print ('"{}"'.format((now-delta).strftime("%b %-d, %Y"))) | |
# Every first Monday of the year |
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
# Assumes you are capturing the output of your golang app panic into /tmp/crash | |
# Reason of the panic | |
head -3 /tmp/crash | |
# Register status (22 may change in different architectures) | |
tail -22 /tmp/crash | |
# Number of goroutines | |
cat /tmp/crash | grep goroutine | wc -l |
- OpenAPI toolkit common string formats: github.com/go-openapi/strfmt
- Seamless printing to the terminal (stdout) and logging to a io.Writer (file) that’s as easy to use as fmt.Println: https://github.com/spf13/jwalterweatherman
- Go package for dealing with maps, slices, JSON and other data: https://github.com/stretchr/objx
- Efficient JSON beautifier and compactor for Go: https://github.com/tidwall/pretty
- bbolt is a fork of Ben Johnson's Bolt key/value store: https://pkg.go.dev/go.etcd.io/bbolt
- Formatters for units to human friendly sizes: github.com/dustin/go-humanize
- Package httpsnoop provides an easy way to capture http related metrics (i.e. response time, bytes written, and http status code) from your application's http.Handlers: https://github.com/felixge/httpsnoop
- Staticcheck - The advanced Go linter: https://github.com/dominikh/go-tools
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 | |
TEMP_DIR=$(mktemp -d) | |
echo Output Directory: ${TEMP_DIR} | |
confirm() { | |
# | |
# syntax: confirm [<prompt>] | |
# | |
# Prompts the user to enter Yes or No and returns 0/1. |
NewerOlder