Skip to content

Instantly share code, notes, and snippets.

View potter0815's full-sized avatar

Christoph Schmitter potter0815

View GitHub Profile
@potter0815
potter0815 / add-hypothesis-webclient-every-site.user.js
Last active March 20, 2024 09:37
Hypothes.is everywhere - Tampermonkey / greasemonkey script to enable Hypothes.is web client on all pages
// ==UserScript==
// @name Hypothes.is everywhere
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Enable Hypothesis scriptlet on all pages
// @author https://github.com/potter0815
// @match http://*/*
// @include http://*
// @include https://*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
@ejdoh1
ejdoh1 / run.sh
Last active December 11, 2023 21:43
AWS SSM Agent Raspberry Pi Installation
# AWS SSM Agent RPi Installation
# First get an SSM agent activate code
# - Login to the AWS web console and browse to the AWS Systems Manager service (SSM).
# - Under Instances & Nodes, select Hybrid Activations
# - Select 'Create activation', fill-out the form and get an activation code
# Login to your server via SSH and run the following commans, entering the code, id and region values
mkdir /tmp/ssm
sudo curl https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/debian_arm/amazon-ssm-agent.deb -o /tmp/ssm/amazon-ssm-agent.deb
@lounagen
lounagen / readme.md
Last active April 12, 2023 00:43 — forked from thomasdarimont/readme.md
Example for decoding a JWT Payload with your Shell (bash, zsh...)

Setup

Add this to your .profile, .bashrc, .zshrc...

BASE64_DECODER_PARAM="-d" # option -d for Linux base64 tool
echo AAAA | base64 -d > /dev/null 2>&1 || BASE64_DECODER_PARAM="-D" # option -D on MacOS

decode_base64_url() {
  local len=$((${#1} % 4))
  local result="$1"
 if [ $len -eq 2 ]; then result="$1"'=='
@mbaitelman
mbaitelman / README.md
Last active February 20, 2024 22:31
Automated Terraform Deployments Using Bitbucket Pipelines
@innovia
innovia / lambda-concurrency-to-cloudwatch.py
Created December 17, 2017 09:30
Lambda concurrent execution custom metric on CloudWatch
#!/usr/bin/env python
import boto3
import datetime
import time
ENABLED_REGIONS = [
"us-east-1",
"us-west-2",
"eu-west-1",
"eu-central-1",
@teknogeek0
teknogeek0 / elb2s3failover.template
Created November 7, 2014 22:10
For Re:Invent 2014, Deployment Automation talk - ELB to S3 Website "Fail Whale" failover CloudFormation template
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "Create a Route53 Fail Whale failover setup from ELB to S3. You need a preexisting ELB, S3 bucket configured as a Website endpoint, and Hosted Zone.",
"Parameters" : {
"ELBDnsName" : {
"Type" : "String",
"Description" : "Your ELB's DNS Name"
},
@s0enke
s0enke / README.md
Last active May 12, 2023 14:21
Dashing Cloudwatch

This is an adjusted version of EC2 CloudWatch stats for Dashing which is not bound to EC2 metrics but a generic widget for cloudwatch graphs. Visualization is done by Rickshawgraph as in the original example.

@grenade
grenade / 01-generate-ed25519-ssh-key.sh
Last active November 9, 2024 20:40
generate ed25519 ssh and gpg/pgp keys and set file permissions for ssh keys and config
#!/bin/bash
# generate new personal ed25519 ssh keys
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <[email protected]>"
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_robtn -C "rob thijssen <[email protected]>"
# generate new host cert authority (host_ca) ed25519 ssh key
# used for signing host keys and creating host certs
ssh-keygen -t ed25519 -f manta_host_ca -C manta.network
@PavelChernyak
PavelChernyak / gist:3406124
Created August 20, 2012 17:52 — forked from danielocallaghan/gist:1016161
NR RUM details
//header
<script>
var NREUMQ=[];NREUMQ.push(["mark","firstbyte",new Date().getTime()]);
(function(){var d=document;var e=d.createElement("script"); e.type="text/javascript"; e.async=true;e.src="https://d7p9czrvs14ne.cloudfront.net/10/eum/rum.js";
var s=d.getElementsByTagName("script")[0];s.parentNode.insertBefore(e,s);})()
</script>
// footer
<script type="text/javascript" charset="utf-8">
NREUMQ.push(["nrf2","beacon-1.newrelic.com","api-key",appID,"cV5eEkBfCF1WRBgECFZEQwNAbwVBQ1peAgdGWF8IQR8LR1ZEQQgDRQ==",6,707])
@dakatsuka
dakatsuka / fluentd.conf
Created April 11, 2012 06:46
fluentd upstart script
description "Fluentd"
start on runlevel [2345]
stop on runlevel [016]
respawn
respawn limit 5 60
exec sudo -u fluentd /opt/fluentd/usr/bin/fluentd -c /opt/fluentd/etc/fluent.conf --log /opt/fluentd/var/log/fluentd.log