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
#!/usr/bin/env bash | |
set -x | |
export DEBIAN_FRONTEND=noninteractive | |
apt-get update && apt-get install -y apt-transport-https | |
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - | |
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list | |
deb http://apt.kubernetes.io/ kubernetes-xenial main | |
EOF |
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
$ sudo ./inst_cuda.sh | |
+ declare cudaUbuntuRepo=http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1704/x86_64 | |
+ declare cudaGPGPubKeyAddr=http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1704/x86_64/7fa2af80.pub | |
+ declare cudaRepoInstaller=http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1704/x86_64/cuda-repo-ubuntu1704_9.1.85-1_amd64.deb | |
+ printf '%s\n' 'Install the CUDA GPG public key...' | |
Install the CUDA GPG public key... | |
+ apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1704/x86_64/7fa2af80.pub | |
Executing: /tmp/apt-key-gpghome.6WVgYJ8JMH/gpg.1.sh --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1704/x86_64/7fa2af80.pub | |
gpg: requesting key from 'http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1704/x86_64/7fa2af80.pub' |
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
--- | |
# FIXME: bootcmd is recognized by cloud-init but not by ignition; the command works manually | |
# URL: https://coreos.com/ignition/docs/latest/configuration-v2_2.html | |
bootcmd: | |
- for cpunum in $(cat /sys/devices/system/cpu/cpu*/topology/thread_siblings_list | cut -s -d, -f2- | sort -un); do echo 0 > /sys/devices/system/cpu/cpu$cpunum/online; done | |
systemd: | |
units: | |
- name: docker.service | |
enable: true | |
- name: locksmithd.service |
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
#!/usr/bin/env bash | |
printf '\n%s\n' "Sourcing-in completions for:" | |
while read -r compFile; do | |
printf '%s\n' " ${compFile##*/}" | |
source "$compFile" | |
done <<< "$(find /usr/local/etc/bash_completion.d -type l)" |
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
Homebrew build logs for vim on macOS 10.12.6 | |
Build date: 2018-09-03 13:13:48 |
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
#!/usr/bin/env zsh | |
userSudoFile="/etc/sudoers.d/$USER" | |
# Set up password-less sudo for the vagrant user | |
echo "$USER ALL=(ALL) NOPASSWD:ALL" | sudo tee "$userSudoFile" > /dev/null 2>&1 | |
sudo chmod 440 "$userSudoFile" | |
#------------------------------------------------------------------------------------ |
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
#!/usr/bin/env bash | |
# PURPOSE: Get package details. | |
# ----------------------------------------------------------------------------- | |
# PREREQS: none | |
# ----------------------------------------------------------------------------- | |
# EXECUTE: curl -Ls https://goo.gl/78ocQ5 2>&1 | bash | tee /tmp/enum-apps.out | |
# ----------------------------------------------------------------------------- | |
# CREATED: 2017/01/27 | |
# ----------------------------------------------------------------------------- | |
set -x |
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
#!/usr/bin/env bash | |
# who/where am I? | |
# a simple (bad) example of bash with PE; https://goo.gl/stZWt | |
set -x | |
# Use PE to save only the last element of the file name; delimited by forward-slash | |
reqdFile="${0##*/}" # Global Scope | |
while read -r foundFile; do | |
# Use the same PE expression to simplify the names |
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
# shellcheck disable=SC2148,SC1090,SC1091,SC2012,SC2139 | |
sysBashrc='/etc/bashrc' | |
bashComps='/usr/local/share/bash-completion/bash_completion' | |
bashCompsDir='/usr/local/etc/bash_completion.d' | |
if [[ -f "\$sysBashrc" ]]; then | |
source "\$sysBashrc" | |
# enable bash completions | |
if [ -f "\$bashComps" ]; then | |
source "\$bashComps" | |
if [[ -d "\$bashCompsDir" ]]; then |
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
# The Daily Grind | |
## Launch a Pod (create a service) | |
kubectl run hello-minikube --image=k8s.gcr.io/echoserver:1.4 --port=8080 deployment | |
## Expose the Pod (service) listening Port | |
kubectl expose deployment hello-minikube --type=NodePort | |
## Contact the Pod | |
curl $(minikube service hello-minikube --url) |