Skip to content

Instantly share code, notes, and snippets.

View alfredgamulo's full-sized avatar
🦄

Alfred Gamulo alfredgamulo

🦄
View GitHub Profile
@alfredgamulo
alfredgamulo / iam-policy.json
Created July 28, 2023 02:33 — forked from quiver/iam-policy.json
How to connect to Amazon RDS PostgreSQL with IAM credentials
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"rds-db:connect"
],
"Resource": [
"arn:aws:rds-db:region:account-id:dbuser:dbi-resource-id/database-user-name"
@alfredgamulo
alfredgamulo / all_aws_managed_policies.json
Created October 29, 2022 14:41 — forked from gene1wood/all_aws_managed_policies.json
A list of all AWS managed policies and they're policy documents as well as a short script to generate the list
This file has been truncated, but you can view the full file.
{
"APIGatewayServiceRolePolicy": {
"Arn": "arn:aws:iam::aws:policy/aws-service-role/APIGatewayServiceRolePolicy",
"AttachmentCount": 0,
"CreateDate": "2019-10-22T18:22:01+00:00",
"DefaultVersionId": "v6",
"Document": {
"Statement": [
{
@alfredgamulo
alfredgamulo / all_aws_managed_policies.json
Created October 29, 2022 14:41 — forked from bernadinm/all_aws_managed_policies.json
A list of all AWS managed policies and they're policy documents as well as a short script to generate the list
{
"AWSAccountActivityAccess": {
"Arn": "arn:aws:iam::aws:policy/AWSAccountActivityAccess",
"AttachmentCount": 0,
"CreateDate": "2015-02-06T18:41:18+00:00",
"DefaultVersionId": "v1",
"Document": {
"Statement": [
{
"Action": [
//$ test_unwrap_templat --pin <PIN> --library </usr/local/Cellar/softhsm/2.5.0/lib/softhsm/libsofthsm2.so>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "cryptoki.h"
#include "dlfcn.h"
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alfredgamulo
alfredgamulo / salactus.md
Created March 8, 2018 15:29 — forked from kapilt/salactus.md
salactus doc improvements

Use Cases

Sometimes you really want to scan all objects, or in the words of gary oldman from the professional, "bring me EVERYONE" :-) There are a couple of different reasons for that from an org perspective, given current feature sets, most of it involves catching up on s3 security from both an acl and encryption perspective after the fact.

Salactus provides for scale out scanning of every s3 object with configurable object visitors. It also supports s3 inventory as a

@alfredgamulo
alfredgamulo / reinvent-2017-youtube.md
Last active December 11, 2017 03:59 — forked from stevenringo/reinvent-2017-youtube.md
Links to YouTube recordings of AWS re:Invent 2017 sessions

| Title | Description

@alfredgamulo
alfredgamulo / lua with C
Last active February 22, 2016 19:22
Use C nanosleep inside lua code
local ffi = require "ffi"
local C = ffi.C
local math = math
math.randomseed( os.time() )
ffi.cdef[[
typedef struct timespec {long tv_sec; long tv_nsec;};
int nanosleep(const struct timespec *rqtp, struct timespec *rmtp);
]]

Keybase proof

I hereby claim:

  • I am alfredgamulo on github.
  • I am alfred (https://keybase.io/alfred) on keybase.
  • I have a public key whose fingerprint is 6563 28F9 8C70 9310 2876 B603 C43A 8AFF 4CD6 694A

To claim this, I am signing this object:

@alfredgamulo
alfredgamulo / gauth.py
Last active August 29, 2015 14:15
Time-based One-Time Pad Algorithm
#!/usr/bin/env python3
# gauth.py
import doctest
import time
import base64
import struct
import hmac
import hashlib