Skip to content

Instantly share code, notes, and snippets.

View mattgillard's full-sized avatar

Matt Gillard mattgillard

View GitHub Profile
@rileydakota
rileydakota / duckdb_cloudtrail_load.sql
Last active July 16, 2024 22:27
Load and Query AWS CloudTrail direct from DuckDB
INSTALL AWS;
LOAD AWS;
CALL load_aws_credentials();
CREATE TABLE ct_raw AS SELECT * FROM read_json('s3://YOUR_CT_BUCKET_WITH_A_DATE_PREFIX/*.gz', maximum_depth=2);
CREATE TABLE ct as SELECT unnest(Records) as Event FROM ct_raw;
CREATE TABLE cloudtrail_events AS SELECT json_extract_string(event, '$.eventVersion') AS eventVersion,
json_extract_string(event, '$.userIdentity.type') AS userType,
json_extract_string(event, '$.userIdentity.principalId') AS principalId,
json_extract_string(event, '$.userIdentity.arn') AS userArn,
json_extract_string(event, '$.userIdentity.accountId') AS accountId,
@cassidoo
cassidoo / base-css.md
Created May 4, 2022 06:37
Base CSS for a plain HTML document

If you don't want to deal with styling a mostly text-based HTML document, plop these lines in and it'll look good:

html {
  font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
  font-size: 1.3em;
  max-width: 40rem;
  padding: 2rem;
  margin: auto;
 line-height: 1.5rem;
@n2o
n2o / nasm_m1.md
Last active February 17, 2025 19:26
Compiling x86_64 assembly program on M1 Mac

If you have an M1 Mac and want to compile and execute x86_64 assembly code, make sure you install Rosetta 2 and nasm (brew install nasm).

Than, take a 64 Bit assembly program, e.g. from this tutorial page (https://cs.lmu.edu/~ray/notes/nasmtutorial/) in Section "Your First Program" for macOS, save it to a file called hello.asm.

Compile, link and execute the program:

nasm -f macho64 hello.asm
ld hello.o -o hello -macosx_version_min 11.0 -L /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib -lSystem

./hello

@SwitHak
SwitHak / 20211210-TLP-WHITE_LOG4J.md
Last active February 7, 2025 23:49
BlueTeam CheatSheet * Log4Shell* | Last updated: 2021-12-20 2238 UTC

Security Advisories / Bulletins / vendors Responses linked to Log4Shell (CVE-2021-44228)

Errors, typos, something to say ?

  • If you want to add a link, comment or send it to me
  • Feel free to report any mistake directly below in the comment or in DM on Twitter @SwitHak

Other great resources

  • Royce Williams list sorted by vendors responses Royce List
  • Very detailed list NCSC-NL
  • The list maintained by U.S. Cybersecurity and Infrastructure Security Agency: CISA List
@robsteriam
robsteriam / az104studymaterials.md
Last active March 3, 2025 14:40
AZ-104 Study Materials Compilation
@Zekfad
Zekfad / conventional-commits.md
Last active April 23, 2025 08:34
Conventional Commits Cheatsheet

Quick examples

  • feat: new feature
  • fix(scope): bug in scope
  • feat!: breaking change / feat(scope)!: rework API
  • chore(deps): update dependencies

Commit types

  • build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
  • ci: Changes to CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
  • chore: Changes which doesn't change source code or tests e.g. changes to the build process, auxiliary tools, libraries
@ChristopherA
ChristopherA / brew-bundle-brewfile-tips.md
Last active April 24, 2025 19:34
Brew Bundle Brewfile Tips

Brew Bundle Brewfile Tips

Copyright & License

Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.

Sponsor

If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.

@DaaaaanB
DaaaaanB / AES_Example.go
Last active December 11, 2023 14:05 — forked from mickelsonm/main.go
A quick example of basic AES encryption using the Golang AES library.
/*
* FILE : AES_Example.go
* PROJECT : INFO-1340 - Block Ciphers
* PROGRAMMER : Daniel Pieczewski, ref: https://github.com/mickelsonm
* FIRST VERSION : 2020-04-12
* DESCRIPTION :
* The function(s) in this file make up example code for encryption and decryption of a block of text
* using the Golang standard library AES implementation using the Cipher Feedback mode of encryption (CFB).
* DISCLAIMER: There is no way that this a secure implementation of AES. This is only for my personal learning.
* So help you God if this ends up in some commercial application.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Serverless Authentication</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<!-- Latest compiled and minified CSS -->

re:Invent 2019 Workshops

A list of public repositories, content, and web from re:Invent 2019 Workshops. Many of the links are subject to be moved or completely removed at any point in time in the future.

Session ID Session Name Repo/Site
SVS203 Build a serverless ride-sharing web application https://webapp.serverlessworkshops.io/
SVS340 Serverless image processing workflows at scale with AWS Step Functions https://image-processing.serverlessworkshops.io/
AIM362 Build, train & debug, and deploy & monitor with Amazon SageMaker http://bit.ly/aim362-workshop
GPSTEC406 AWS Alien Attack workshop https://alienattack.workshop.aws/