Skip to content

Instantly share code, notes, and snippets.

View statik's full-sized avatar
😎
happily working! I may be slow to respond

Elliot Murphy statik

😎
happily working! I may be slow to respond
View GitHub Profile
@statik
statik / passwordpolicy-generated.yaml
Last active August 25, 2020 16:51
CDK managed AWS Account Password Policy
Resources:
AccountPasswordPolicyC318930E:
Type: Custom::AWS
Properties:
ServiceToken:
Fn::GetAtt:
- AWS679f53fac002430cb0da5b7982bd22872D164C4C
- Arn
Create:
service: IAM
import * as sns from '@aws-cdk/aws-sns';
import * as cdk from '@aws-cdk/core';
import { PolicyStatementBuilder } from '../lib/policy';
import { DeployableStack } from '../lib/deployable';
import { PhysicalStackProps } from '../lib/physical';
/** EmptyStack is supposed to contain nothing. It is used when we want to remove all of the constructs
* from a stack, because CloudFormation will not destroy a stack just because we removed it.
*
@statik
statik / README.md
Created July 21, 2020 19:43
setting up ssm access to ec2 instance

Make sure the user roles that need to access the instance have ssm:StartSession and ssm:TerminateSession permissions granted.

@statik
statik / convert-to-prores
Created April 7, 2020 19:06
convert video file to prores
#!/usr/bin/env bash
set -eo pipefail
USAGE='convert-to-prores inputfile [outputfile] [prores setting 1 to 5, default 3]'
DESCRIPTION='
Converts a video file to ProRes for playback on HyperDeck or NLE
The outputfile is optional, if not provided it will be based on the input file name
The profile switch takes an integer from -1 to 5 to match the ProRes profiles
@statik
statik / notion2blog.js
Created February 10, 2020 20:33 — forked from SafEight/notion2blog.js
Notion.so > Personal Blog | custom domain + disqus comment
const MY_DOMAIN = "example.com"
const START_PAGE = "https://www.notion.so/example"
addEventListener('fetch', event => {
event.respondWith(fetchAndApply(event.request))
})
const corsHeaders = {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, HEAD, POST,PUT, OPTIONS",
@statik
statik / gist:f997e391910ffeb2fda3815c31269eef
Last active December 19, 2019 02:02
list of bazel python rules alternative implementations
@statik
statik / vid2gif.sh
Created August 27, 2019 18:59 — forked from crashGoBoom/vid2gif.sh
Create a gif from mov file using FFMPEG
_video_file="${1}"
ffmpeg -i $_video_file -vf palettegen pal.png
ffmpeg -i $_video_file -i pal.png -lavfi paletteuse=bayer_scale=4:dither=bayer -r 18 video.gif
@statik
statik / excerpt.yaml
Last active July 5, 2019 16:03
serverless siem fixes
LambdaSortGDFindings:
Type: 'AWS::Lambda::Function'
Condition: AuditAccountPrimary # only in primary audit region, next to S3 bucket
Properties:
Code:
ZipFile: |
import boto3, csv, os, json
s3_resource = boto3.resource('s3')
s3_client = boto3.client('s3')
@statik
statik / multipageform.elm
Last active April 4, 2017 03:33 — forked from onetwothreebutter/multipageform.elm
Simple multi-page form
import Html exposing (Html, Attribute)
import Html
import Html.Attributes
import Html.Events exposing (..)
import List
import String
------------------
--- HELPER CODE --
------------------
@statik
statik / GistList!.md
Created September 4, 2015 16:44
Try GistList for iOS! http://gistlist.io/

##alt text GistList: TODO for coders alt text