Skip to content

Instantly share code, notes, and snippets.

View joepindar's full-sized avatar

Joe Pindar joepindar

  • Fresh Security
  • UK
View GitHub Profile
@joepindar
joepindar / README.md
Created July 5, 2020 12:52 — forked from MichaelCurrin/README.md
Github GraphQL - Get all file contents in repository

Get Github Files

Get the metadata and contents of all files in a target Github repo using GraphQL

Made for

Github V4 GraphQL API

About the query

@joepindar
joepindar / neo4j-orphan-nodes
Created August 8, 2019 22:06
Neo4J CYPHER queries to find and delete orphan nodes
// MATCH orphan nodes in Neo4J
MATCH (node)
WHERE NOT( (node)-[]-() )
RETURN node
// DELETE orphan nodes in Neo4J
MATCH (node)
WHERE NOT( (node)-[]-() )
DELETE node
@joepindar
joepindar / aws_s3_deployment_permissions.json
Created September 17, 2018 11:53
AWS S3 Permissions - Global Read + Deployment User
{
"Version": "2012-10-17",
"Id": "Policy1537184900949",
"Statement": [
{
"Sid": "Public Read Access",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::<BUCKET-NAME>/*"

Keybase proof

I hereby claim:

  • I am joepindar on github.
  • I am joepindar (https://keybase.io/joepindar) on keybase.
  • I have a public key ASAJrdyaCZ__uD7H1F0k_UBi6LTPpnMDlCTwJm-CFGUkjAo

To claim this, I am signing this object:

@joepindar
joepindar / reflector.py
Created February 4, 2018 18:10
AWS Lambda reflector function - prints and returns whatever it is sent from API Gateway
+# Uses Python3
+import json
+
+# Generate a response for the browser
+def _generate_response(status, body):
+ return {
+ 'statusCode': status,
+ 'headers': {
+ 'Access-Control-Allow-Origin': '*',
+ 'X-Requested-With': '*',
  1. Download the youtube video using http://www.savido.net

  2. Create a palette from the video:

  • skip the first 13 seconds of the input
  • create a 6 second output
  • 5 frames per second to minimize size
  • scale the output to be 320 pixels wide and automatic height, preserve aspect ratio

ffmpeg -y -ss 13 -t 6 -i videoplayback.mp4 -vf fps=5,scale=320:-1:flags=lanczos,palettegen palette.png