Skip to content

Instantly share code, notes, and snippets.


David Wells DavidWells

View GitHub Profile
wlib / LICENSE
Last active Apr 19, 2021
Run a shell script with bash, line-by-line, prompted on each command. Useful for running unknown scripts or debugging. Not a secure substitute for understanding a script beforehand.
MIT License
Copyright (c) 2021 Daniel Ethridge
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
singledigit /
Last active Feb 15, 2021
Install AWS SAM on Linux using the new Linux installer
curl -L -o
unzip -d sam-installation
sudo ./sam-installation/install
where sam
sam --version
mdlavin / template.yml
Created Jan 23, 2021
Amplify custom auth domain template.yml
View template.yml
AWSTemplateFormatVersion: 2010-09-09
Type: String
Type: String
mdlavin / amplify-custom-auth-domain-app.js
Created Jan 23, 2021
Amplify Custom Auth Domain Config Update
View amplify-custom-auth-domain-app.js
import awsconfig from "./aws-exports";
import Amplify from "@aws-amplify/core";
// Find the User Pool ID for your production deployment in
// the AWS Console
if (awsconfig.aws_user_pools_id === "us-east-1_M7n6RNrq9") {
awsconfig.oauth.domain = ";
View gist:a14e7a589a6f270fb44190a05594d15b
// connect route
const apigatewayroutesocketconnect = new apigateway.CfnRoute(this, "apigatewayroutesocketconnect", {
routeKey: "$connect",
authorizationType: "AWS_IAM",
apiKeyRequired: false,
operationName: "ConnectRoute",
target: "integrations/"+new apigateway.CfnIntegration(this, "apigatewayintegrationsocketconnect", {
apiId: apigatewaysocket.ref,
integrationType: "AWS_PROXY",
kentcdodds / .gitignore
Last active Mar 16, 2021
This will create a Google Voice "native" app on your computer
View .gitignore
View Better Stripe Invoice Generator by @levelsio
# MIT license, do whatever you want with it
# This is my invoice.php page which I use to make invoices that customers want,
# with their address on it and which are easily printable. I love Stripe but
# their invoices and receipts were too wild for my customers on Remote OK
kentcdodds /
Last active Dec 30, 2020


I was poking around trying to figure out all the packages I have access to publish and got curious. So I write this little script to determine the download stats for all the packages I have publish access to.

Feel free to try it yourself. Just change the username passed to getUserDownloadStats.

By default, the stats are sorted by their average daily downloads (descending). That should give you an idea of the most "popular" package of a given user relative to how long that package has been around.

You can use it with npx like so:

swinton /
Last active Dec 3, 2020
Automatically sign your commits from GitHub Actions, using the REST API

Verified commits made easy with GitHub Actions


So you want to commit changes generated by a GitHub Actions workflow back to your repo, and have that commit signed automatically?

Here's one way this is possible, using the REST API, the auto-generated GITHUB_TOKEN, and the GitHub CLI, gh, which is pre-installed on GitHub's hosted Actions runners.

You don't have to configure the git client, just add a step like the one below... Be sure to edit FILE_TO_COMMIT and DESTINATION_BRANCH to suit your needs.

FermiDirak / reactathon2020.js
Created Nov 30, 2020
Learn static code analysis in React!
View reactathon2020.js
import jscodeshift from "jscodeshift";
import fs from "fs";
import path from "path";
const projectDirectory = "my/project/root/directory";
// util functions