Skip to content

Instantly share code, notes, and snippets.

View jacksonporter's full-sized avatar

JP (Jackson Porter) jacksonporter

  • Orem, UT
  • 13:56 (UTC -07:00)
View GitHub Profile
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@jacksonporter
jacksonporter / gist:bd1f63355eb6c85732f51dec2e7484bc
Created August 14, 2020 22:46 — forked from xxxVxxx/gist:9648264fd6f41bbb1f65
boto3 aws find all IAM accesskeys details for the account
#!/usr/bin/env python
import boto3
import datetime
import json
ACCESS_KEY_LAST_USED_KEY = "AccessKeyLastUsed"
KEY = "LastUsedDate"
USERS_KEY = "users"
NUMBER_OF_KEYS_KEY = "number_of_keys"
@jacksonporter
jacksonporter / add_new_user_zsh_ssh.sh
Last active March 21, 2020 00:57 — forked from zuckercode/gist:3720747
add new user with zsh as default shell, setup of basic SSH keys
#!/usr/bin/env bash
# Re-written by Jackson Porter
# Forked from: https://gist.github.com/zuckercode/3720747
# SSH Key generation/new user reference: https://www.digitalocean.com/community/questions/ubuntu-16-04-creating-new-user-and-adding-ssh-keys
# Color Code obtained from: https://gist.github.com/jacksonporter/73f8e9343e61e280cb178aa6ef4ec64e
set -e
eval "$(curl -fsSL https://gist.github.com/jacksonporter/791145218e977ef9165abd9fdf8fbfd4/raw)" # obtains my common bash utilies script and "sources" it