Skip to content

Instantly share code, notes, and snippets.

:octocat:
codz

Sam Mingo slmingol

:octocat:
codz
Block or report user

Report or block slmingol

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@slmingol
slmingol / README.md
Created Nov 14, 2019 — forked from joyrexus/README.md
curl tutorial
View README.md

An introduction to curl using GitHub's API.

Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin

Includes HTTP-Header information in the output

@slmingol
slmingol / vimdiff.md
Created Sep 6, 2019 — forked from mattratleph/vimdiff.md
vimdiff cheat sheet
View vimdiff.md

vimdiff cheat sheet

##git mergetool

In the middle file (future merged file), you can navigate between conflicts with ]c and [c.

Choose which version you want to keep with :diffget //2 or :diffget //3 (the //2 and //3 are unique identifiers for the target/master copy and the merge/branch copy file names).

:diffupdate (to remove leftover spacing issues)
:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)
View openshift-cheatsheet.md

My Openshift Cheatsheet

Install paks using yum in a Dockerfile

# Install Runtime Environment
RUN set -x && \ 2
    yum clean all && \
    REPOLIST=rhel-7-server-rpms,rhel-7-server-optional-rpms,rhel-7-server-thirdparty-oracle-java-rpms \
@slmingol
slmingol / IAM Permissions List.md
Created Sep 15, 2019 — forked from mechcozmo/IAM Permissions List.md
A list of IAM permissions you can use in policy documents. Collected from the myriad of places Amazon hides them. (incomplete)
View IAM Permissions List.md
@slmingol
slmingol / decode_aws_auth_fail_msg.sh
Created Mar 1, 2019 — forked from xiongchiamiov/why.sh
Use this when Amazon gives you an "Encoded authorization failure message" and you need to turn it into something readable. If you only get a request id... you're out of luck.
View decode_aws_auth_fail_msg.sh
#!/bin/bash
# REF: https://gist.github.com/xiongchiamiov/b0ef0251813625307371d0e11e131759#file-why-sh
# REF: https://bcb.github.io/pipe-jq-to-less
function decode-authorization-failure-message {
if [ $# -ne 1 ] || [ "$1" = -h ] || [ "$1" = --help ]; then
cat <<'EOT'
Usage: decode-authorization-failure-message <message>
@slmingol
slmingol / .gitconfig
Created Aug 13, 2019 — forked from robmiller/.gitconfig
Some useful Git aliases that I use every day
View .gitconfig
#
# Working with branches
#
# Get the current branch name (not so useful in itself, but used in
# other aliases)
branch-name = "!git rev-parse --abbrev-ref HEAD"
# Push the current branch to the remote "origin", and set it to track
# the upstream branch
publish = "!git push -u origin $(git branch-name)"
@slmingol
slmingol / README.md
Last active Jul 28, 2019
Setting up Raspbian on a Raspberry Pi as a OpenVPN Gateway
View README.md

Setting up Raspbian on a Raspberry Pi as a OpenVPN Gateway

openvpn install/configure

$ sudo apt -y upgrade
$ sudo reboot

$ sudo apt -y install openvpn ca-certificates unzip jq
$ cd /etc/openvpn
$ sudo wget https://downloads.nordcdn.com/configs/archives/servers/ovpn.zip
@slmingol
slmingol / npm-using-https-for-git.sh
Created Jul 25, 2019 — forked from taoyuan/npm-using-https-for-git.sh
Force git to use https:// instead of git://
View npm-using-https-for-git.sh
git config --global url."https://github.com/".insteadOf git@github.com:
git config --global url."https://".insteadOf git://
You can’t perform that action at this time.