Skip to content

Instantly share code, notes, and snippets.

View davedash's full-sized avatar
🏠
Working from home

Dave Dash davedash

🏠
Working from home
View GitHub Profile
@davedash
davedash / vercel-alias.yml
Created March 15, 2021 05:45
Vercel Alias Github Action
name: Vercel Alias
on: [deployment_status]
jobs:
alias:
if: |
github.event.deployment_status.state == 'success' &&
endsWith( github.event.deployment_status.target_url, '.vercel.app')
runs-on: ubuntu-latest
steps:
- uses: octokit/request-action@v2.x
#!/bin/bash -e
# This script finds IAM users who have passwords but no MFA.
# Deal with them accordingly.
# Generate a report
aws iam generate-credential-report > /dev/null
# Download report.
REPORT=$(aws iam get-credential-report)
"analysis": {
"filter": {
"autocomplete_filter": {
"type": "edge_ngram",
"min_gram": "1",
"max_gram": "20"
},
"word_joiner": {
"type": "word_delimiter",
"catenate_all": true
#!/bin/bash -e
CIRCLE_TOKEN=PRIVATE
API_ROOT=https://circleci.com/api/v1
_project=PRIVATE
_branch=circle-ci-test
URL=${API_ROOT}/project/${_project}/tree/${_branch}?circle-token=${CIRCLE_TOKEN}
@davedash
davedash / pkill.py
Last active February 15, 2018 20:40
This errors out and says the exit code of pkill was the SIGTERM sent.
# run grep asdf &
subprocess.call("pkill -f grep", shell=True)
# Returns -15
subprocess.call("pkill -9 -f grep", shell=True)
# Returns -9, and grep is killed.
DOT_COM_TO_TODAY = {'kozmo.com': 'postmates'}
version: '2'
services:
consul1:
image: "consul:latest"
container_name: "consul1"
hostname: "consul1"
ports:
- "8400:8400"
- "8500:8500"
- "8600:53"
@davedash
davedash / -
Created October 21, 2016 06:00
test
.
├── Saltfile
├── config
│   ├── master
│   ├── pki
│   ├── roster
│   ├── salt.log
│   └── var
├── pki
│   └── ssh
/Users/davedash/code/personal/salt/salt