Skip to content

Instantly share code, notes, and snippets.

@ignitz
ignitz / all_aws_actions.txt
Created June 14, 2022 01:02 — forked from tonio-m/all_aws_actions.txt
All AWS actions for all services to help you build your roles. Use ctrl+f to find what you want. Ripped from: https://awspolicygen.s3.cn-north-1.amazonaws.com.cn/policygen.html
access-analyzer:ApplyArchiveRule
access-analyzer:CancelPolicyGeneration
access-analyzer:CreateAccessPreview
access-analyzer:CreateAnalyzer
access-analyzer:CreateArchiveRule
access-analyzer:DeleteAnalyzer
access-analyzer:DeleteArchiveRule
access-analyzer:GetAccessPreview
access-analyzer:GetAnalyzedResource
access-analyzer:GetAnalyzer
@ignitz
ignitz / apple_jwt_generator.py
Last active January 23, 2020 13:21
Template to generate JWT on Apple Store API
import jwt
from datetime import datetime
def get_token(authkey="privatekey.pem", ISSUER_ID = "UUID", KEY_ID = "KEYID"):
"""
Generater JSON Web Token from AppleStore API
"""
key = None
with open(authkey) as f:
key = f.read()
@ignitz
ignitz / GenerateFlowFiletoScript.groovy
Last active January 20, 2020 14:17
Simple example of hardcoded NiFi cluster with 3 nodes without authentication
import java.nio.charset.StandardCharsets;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
flowFile = session.get();
if(!flowFile){return;}
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
LocalDate startDate = LocalDate.now().minusDays(1);
@ignitz
ignitz / cloudFormationExample.yaml
Created January 20, 2020 14:08
Example of CloudFormation to deploy a nginx and Jupyter instances
AWSTemplateFormatVersion: '2010-09-09'
Description: Deploys a simple instance with UserData that I'm RICA.
Parameters:
KeyName:
Description: Name of an existing EC2 KeyPair to enable SSH access to the instance
Type: AWS::EC2::KeyPair::KeyName
ConstraintDescription: must be the name of an existing EC2 KeyPair.
InstanceType:
Description: EC2 instance type
Type: String
@ignitz
ignitz / delete_watchlater_in_youtube_LEGACY.js
Created January 20, 2020 13:55
Delete entire playlist Watch Later on Youtube
var items = $('body').getElementsByClassName("yt-uix-button yt-uix-button-size-default yt-uix-button-default yt-uix-button-empty yt-uix-button-has-icon no-icon-markup pl-video-edit-remove yt-uix-tooltip");
function deleteWL(i) {
setInterval(function() {
items[i].click();
}, 500);
}
for (var i = 0; i < 1; ++i)
@ignitz
ignitz / speechSynthesisUtterance_in_browser.html
Created January 20, 2020 13:41
Browser voice engine example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=100%, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Document</title>
</head>
<body>
<script>
@ignitz
ignitz / TurnOff.bat
Created August 12, 2018 16:11
Turn off Screen on Windows
powershell (Add-Type '[DllImport(\"user32.dll\")]^public static extern int SendMessage(int hWnd, int hMsg, int wParam, int lParam);' -Name a -Pas)::SendMessage(-1,0x0112,0xF170,2)
/* LZSS encoder-decoder (Haruhiko Okumura; public domain) */
#include <stdio.h>
#include <stdlib.h>
#define EI 11 /* typically 10..13 */
#define EJ 4 /* typically 4..5 */
#define P 1 /* If match length <= P then output one character */
#define N (1 << EI) /* buffer size */
#define F ((1 << EJ) + 1) /* lookahead buffer size */