This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Takes a deeply nested object, `source`, and returns an object with | |
* dot-separated paths pointing to all primitive values from `source`. | |
* | |
* Examples: | |
* | |
* flatten({ foo: { bar: 1 } }) | |
* //=> { 'foo.bar': 1 } | |
* | |
* flatten({ foo: [{ bar: 1 }, { bar: 2 }] }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
printf "%s\n%s\n" "Note: This program assumes there is only 1 key (sec) assigned to a GPG Public key. If there is a secondary (ssb) assigned, this program WILL NOT work." | |
# Signing Commits and Assigning GPG Key to GitHub Account | |
# https://help.github.com/en/articles/signing-commits | |
# https://help.github.com/en/articles/associating-an-email-with-your-gpg-key | |
$(gpg --update-trustdb 2> 1) | |
# Fetch list-secret-keys & public key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:11 | |
LABEL "com.github.actions.name"="yarning for this" | |
LABEL "com.github.actions.description"="I yarn on this day." | |
LABEL "com.github.actions.icon"="" | |
LABEL "com.github.actions.color"="purple" | |
LABEL "repository"="https://gist.github.com/kylejeske" | |
LABEL "homepage"="https://github.com/kylejeske/" | |
LABEL "maintainer"="Kyle Jeske <[email protected]>" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Run this on your server, and connect to port 2020. | |
sudo `which sshd` -p 2020 -Dd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
{ | |
set -xe | |
# on alpine linux 3.8 | |
# libfuse3.1+ required on linux | |
# https://github.com/libfuse/sshfs | |
# https://github.com/libfuse/libfuse | |
apk add fuse3 | |
modprobe fuse3 | |
docker plugin install vieux/sshfs --grant-all-permissions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
{ | |
set -e; | |
DKCMD=$(which docker); | |
## gcc, json, check | |
${FORMAT:-"gcc"}; | |
${VERSION:-"v0.4.7"}; | |
${FILE:-"not-magic-logic-based-scripts.sh"}; | |
output=$("$DKCMD" run -v "$PWD:/mnt" "koalaman/shellcheck:${VERISON}" -f gcc "$FILE"); | |
echo "$output" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hosts: all | |
vars: | |
file_path_1: /usr/bin | |
file_path_2: /example | |
file_path_3: /opt | |
tasks: | |
- name: example task | |
file: | |
path: "{{ item.0 }}/{{ item.1 }}" | |
state: present |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:alpine AS base-build | |
RUN apk update && apk add --no-cache git | |
WORKDIR $GOPATH/src/mypackage/myapp/ | |
COPY . . | |
RUN go get -d -v | |
RUN go build -o /go/bin/hello | |
## using COPY | |
FROM scratch | |
## COPY --from=base-builder /go/bin/hello /go/bin/hello |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# should print out: | |
# apk add [all packages installed] | |
{ | |
set -e; | |
packages=$(apk info -vv | sort | awk "{print $1}" | cut -d" " -f0 | tr "\n" " "); | |
printf "apk add %s" "$packages"; | |
exit 0; | |
} || echo "Something went wrong. Error: $!"; exit 1; |
OlderNewer