Skip to content

Instantly share code, notes, and snippets.

View mattgillard's full-sized avatar

Matt Gillard mattgillard

View GitHub Profile
@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 June 26, 2024 05:52
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 June 22, 2024 10:52
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 June 24, 2024 07:47
AZ-104 Study Materials Compilation
@ChristopherA
ChristopherA / brew-bundle-brewfile-tips.md
Last active June 22, 2024 03:19
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/
@sebsto
sebsto / code-stack.ts
Last active October 12, 2023 13:12
CDK Create EC2 instace in private subnet. Install Nginx.
import ec2 = require('@aws-cdk/aws-ec2');
import cdk = require('@aws-cdk/core');
import { Fn, Tag, Resource } from '@aws-cdk/core';
import { AmazonLinuxImage, UserData, InstanceType } from '@aws-cdk/aws-ec2';
import { Role, ServicePrincipal, ManagedPolicy, CfnInstanceProfile } from '@aws-cdk/aws-iam'
/**
* Create my own Ec2 resource and Ec2 props as these are not yet defined in CDK
* These classes abstract low level details from CloudFormation
@NeilBostrom
NeilBostrom / AWS4SignerMessageHandler.cs
Last active December 4, 2020 10:30
AWS AWS4Signer HttpClientHandler implementation with GraphQL client example
static async Task Main(string[] args)
{
var options = new GraphQLHttpClientOptions
{
EndPoint = new Uri("https://countries.trevorblades.com/"),
HttpMessageHandler = new AWS4SignerMessageHandler(
new AmazonAppSyncClient(),
"--awsAccessKeyId--",
"--awsSecretAccessKey--")
};