Skip to content

Instantly share code, notes, and snippets.

View chadfawcett's full-sized avatar

Chad Fawcett chadfawcett

View GitHub Profile
@chadfawcett
chadfawcett / weekly-standup.sh
Last active February 2, 2022 01:01
Actions Workflow to automatically create a new Discussion every Friday for weekly standup.
#!/bin/bash
# script/weekly-standup.sh
# The `date` command on MacOS doesn't include the `--date` parameter, so we pass in the generated title for ease of testing
TITLE="$1"
# Funkyness to read in our multi-line markdown as a variable to pass to GraphQL
read -r -d '' BODY << EOM
### Instructions
- Example instructions
@chadfawcett
chadfawcett / bacon.js
Last active February 21, 2019 05:55
test multi file embedly
if (window.location.contains('bacon')) {
console.log('🥓')
}
@chadfawcett
chadfawcett / now.json
Last active February 26, 2019 22:48
Blog Post: Probot on Now v2
// now.json
{
"version": 2,
"env": {
"APP_ID": "@app-id",
"WEBHOOK_SECRET": "@webhook-secret",
"PRIVATE_KEY": "@private-key-base64-encoded"
},
"builds": [{ "src": "now.js", "use": "@now/node" }],
"routes": [{ "src": "/", "dest": "/now.js" }]
@chadfawcett
chadfawcett / now.js
Last active February 21, 2019 03:03
Blog Post: Probot on Now v2
// now.js
var { serverless } = require('@chadfawcett/probot-serverless-now')
const appFn = require('./app')
module.exports = serverless(appFn)
@chadfawcett
chadfawcett / now-probot.js
Created December 21, 2018 05:00
Probot wrapper for deployment on Zeit Now 2.0
// Simplified for clarity
const { createProbot } = require('probot')
const app = require('../')
const probot = createProbot({
id: process.env.APP_ID,
secret: process.env.WEBHOOK_SECRET,
cert: process.env.PRIVATE_KEY
})

Keybase proof

I hereby claim:

  • I am chadfawcett on github.
  • I am chadfawcett (https://keybase.io/chadfawcett) on keybase.
  • I have a public key ASC3bDub2bwhoAMmpGxlLvzFtqp6GKmBJbckpqR7UhSWnQo

To claim this, I am signing this object:

@chadfawcett
chadfawcett / rpm.py
Created July 16, 2014 21:20
Simple Python USB OBD II RPM and Speed Reader
import serial
from time import sleep
#Play around with timeout to see if I can improve refresh rate
ser = serial.Serial("/dev/tty.usbserial", 38400, timeout=0.1)
for x in range(0, 100):
ser.write("01 0C\r")
sleep(0.05)
rpm_hex = ser.readline().split(' ') #Try other read methods to increase speed