Skip to content

Instantly share code, notes, and snippets.

View theaccordance's full-sized avatar
:octocat:

Joe Mainwaring theaccordance

:octocat:
View GitHub Profile
@theaccordance
theaccordance / On2Air: Default Values Script
Created November 20, 2020 04:34 — forked from soc201/On2Air: Default Values Script
Script for setting default values in Airtable
/*****
* Title: Manage & Run Default Values
* License: MIT
* Author: Openside (Team behind On2Air products and BuiltOnAir community)
* Sites:
* https://openside.com - Openside Consulting Services
* https://openside.com/#products - On2Air Products
* https://builtonair.com - All things Airtable Community
*
* Reach out for all your Airtable needs
@theaccordance
theaccordance / create-rc-branch.yml
Created July 10, 2020 17:43
cut branch workflow
name: Create a release candidate branch
on:
schedule:
- cron: "45 9 * * 5" # Early Friday morning Central time (cron is UTC time!)
workflow_dispatch:
jobs:
create-release-candidate:
@theaccordance
theaccordance / docker-compose.yml
Last active January 24, 2021 17:06
Home Sever Configuration for Knowhere using Balena
version: "2"
services:
auth:
container_name: auth
image: thomseddon/traefik-forward-auth:2
networks:
- traefik_proxy
environment:
- PROVIDERS_GOOGLE_CLIENT_ID=redacted
- PROVIDERS_GOOGLE_CLIENT_SECRET=redacted
@theaccordance
theaccordance / slack.open.json
Created June 4, 2020 19:42
Slack Open Modal Example
{
"title": {
"type": "plain_text",
"text": "New Seed Company",
"emoji": true
},
"submit": {
"type": "plain_text",
"text": "Generate",
"emoji": true

Gmail Filters

Github

Matches: from:([email protected]) -{"@<REPLACE_WITH_YOUR_GITHUB_HANDLE"}
Do this: Skip Inbox, Apply label "Github", Never mark it as important
@theaccordance
theaccordance / nvm-deafult.sh
Created January 9, 2020 22:26
Sets the current node version to what's defined by the project & then sets it as the default for the system
#!/bin/bash
nvm use && NODE_VER=$(node -v) && nvm alias default $NODE_VER
@theaccordance
theaccordance / ProductAPIs.md
Last active May 7, 2019 02:22
List of APIs that are used for building products

Communication

  • Twilio: Communication - SMS, Whatsapp, Voice, etc
  • MailChimp: Marketing/Email
  • SignalWire: Advanced Communication (SMS)
  • Pusher: Realtime communication, Push Notifications, and Chat
  • SendGrid: Email communications
  • Slack: Workplace communication

Financial

  • Plaid: Banking & Financial Data
@theaccordance
theaccordance / mkv-to-mp4.sh
Created January 31, 2019 18:48
Batch script to recursively convert all .mkv files in a path into .mp4 files. Requires `avconv` dependency
#!/bin/sh
findpath=$1
: ${findpath:="."}
find "$findpath" -name '*.mkv' | while read f ; do
dir=$(dirname "$f");
file=$(basename "$f");
# ext="${filename##*.}";
name="${file%.*}";
# echo "avconv -i \"$f\" -codec copy \"$dir/$name.mp4\"";
avconv -i "$f" -codec copy "$dir/$name.mp4" </dev/null;
################################################################################
## Raspberry Pi Configuration Settings
##
## Revision 16, 2013/06/22
##
## Details taken from the eLinux wiki
## For up-to-date information please refer to wiki page.
##
## Wiki Location : http://elinux.org/RPiconfig
##
@theaccordance
theaccordance / middleware.spec.ts
Created December 19, 2018 18:36
Express.js Middleware Unit Test Example
import sinon from 'sinon';
import { mockReq, mockRes } from 'sinon-express-mock';
import {handleSAMLPost, validateSubdomain} from "./login.handler";
describe("login.spec", () => {
describe("validateSubdomain Middleware", () => {
test("should allow request to continue if request comes from a valid subdomain", () => {
const request = mockReq({
hostname: "octan.localhost"
});