Skip to content

Instantly share code, notes, and snippets.

@nothsa
nothsa / README.md
Last active March 18, 2020 20:01 — forked from jpsilvashy/README.md
Post Google Sheets form entries to Slack

Post Google Sheets form entries to Slack

By using Google Form's script editor, you can call Slack webhooks when form submissions are made. You can use this script to do things like creating a live feedback form for taking questions from an audience or notifying your team when someone signs up for an event.

Setup

First, be sure you're collecting the email address in the form:

'img'

@nothsa
nothsa / cloudflaredns.sh
Created January 4, 2017 19:16 — forked from m-wild/cloudflaredns.sh
CloudFlare dynamic dns updater module for Synology
#!/bin/sh
# cloudflareddns.sh - dynamic dns updater module for Synology
#
# Author:
# Michael Wildman (http://mwild.me)
#
# Version:
# 0.2
#
@nothsa
nothsa / raid_ephemeral.sh
Created July 6, 2016 16:57 — forked from joemiller/raid_ephemeral.sh
detect all ephemeral disks on EC2 then stripe together in a raid-0 vol mounted at /mnt
#!/bin/bash
#
# this script will attempt to detect any ephemeral drives on an EC2 node and create a RAID-0 stripe
# mounted at /mnt. It should be run early on the first boot of the system.
#
# Beware, This script is NOT fully idempotent.
#
METADATA_URL_BASE="http://169.254.169.254/2012-01-12"
@nothsa
nothsa / aws_autoscaling_cron.rb
Last active April 20, 2016 06:04 — forked from kixorz/aws_autoscaling_cron.rb
Running cron jobs in AWS Auto Scaling group is tricky. When you deploy the same code and configuration to all instances in the group, cron job would run on all of them. You may not want that. This script detects the first instance in the group and allows only this instance to run the job. IAM user used by this script needs to have permissions to…
#!/usr/bin/env ruby
require 'syslog'
require 'net/http'
require 'aws-sdk'
Syslog.open
AWS.config({
:access_key_id => '<iam user key>',
:secret_access_key => '<iam user secret>'
### Keybase proof
I hereby claim:
* I am nothsa on github.
* I am ashtonc (https://keybase.io/ashtonc) on keybase.
* I have a public key whose fingerprint is CC36 A175 83BA 7F8C 0404 8B84 DD79 7370 35CC 49A5
To claim this, I am signing this object:
# Find the IAM username belonging to the TARGET_ACCESS_KEY
# Useful for finding IAM user corresponding to a compromised AWS credential
# Requirements:
#
# Environmental variables:
# AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY
# python:
# boto