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
# This simple setup fixes the following error on MacOS. | |
# | |
# scrypt-1.2.1/libcperciva/crypto/crypto_aes.c:6:10: fatal error: 'openssl/aes.h' file not found | |
# #include <openssl/aes.h> | |
# ^~~~~~~~~~~~~~~ | |
# 1 error generated. | |
# error: command '/usr/bin/clang' failed with exit code 1 | |
# [end of output] | |
# | |
# note: This error originates from a subprocess, and is likely not a problem with pip. |
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
# Licensed under the Apache License, Version 2.0 (the "License"); you may | |
# not use this file except in compliance with the License. You may obtain | |
# a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | |
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |
# License for the specific language governing permissions and limitations |
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
{ | |
description = "A nixos cloudinit base image without nixos-infect"; | |
inputs = { | |
nixpkgs.url = "github:nixos/nixpkgs"; | |
}; | |
outputs = { self, nixpkgs }: | |
let | |
system = "x86_64-linux"; |
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
alias os='openstack --os-cloud rxt-mvp ' | |
os network create osh1 | |
os subnet create \ | |
osh1-subnet \ | |
--network osh1 \ | |
--subnet-range 172.31.0.0/28 \ | |
--dns-nameserver 8.8.8.8 |
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
function ara-task-uniq-hosts () { | |
# Scans across all tasks within 1 million records and returns all of the unique hosts where the task | |
# meets a certain state. Default state is "ok" | |
# When looking for the "changed" state the special CLI modifier is used. | |
TASK_NAME=$1 | |
TASK_STATE=${2:-ok} | |
if [ ${TASK_STATE} == "changed" ]; then | |
TASK_MODIFY="--changed" | |
else | |
TASK_MODIFY="--status ${TASK_STATE}" |
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
function fig-up () { | |
function get_latest_release() { | |
curl $(curl --silent "https://api.github.com/repos/ovrclk/cosmos-omnibus/releases/latest" | jq ".url" -r) | jq -r .tag_name | |
} | |
function get_rpc_endpoint() { | |
curl --silent "https://cdn.jsdelivr.net/gh/cosmos/chain-registry@master/$1/chain.json" | jq ".apis.rpc[0].address" -r | |
} | |
if ! command -v jq &> /dev/null; 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
# This playbook is used to upgrade teleport in place, it will deploy the apt repo using facts. | |
# | |
# Invocation, | |
# $ ansible-playbook -i ~/projects/teleport-inventory.py ~/projects/teleport-playbook.yml -e ansible_user=debian --limit '!teleport-server' | |
# | |
# NOTE: This playbook book exectuion is using dynamic inventory and a limit which is ensuring that the playbook is not executed against | |
# the teleport server. The playbook can be used on the teleport server, it just has to be done in isolation; a restart of the server | |
# will impact client connectivity. | |
--- | |
- name: Teleport updates |
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
import collections | |
import json | |
import re | |
import sys | |
GROUPS = dict() | |
HOSTS = dict() | |
PROTOS = dict() | |
R_WORDS = re.compile(r"\w+") |
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
cat > /etc/modprobe.d/blacklist-nouveau.conf <<EOF | |
blacklist nouveau | |
options nouveau modeset=0 | |
EOF | |
apt update | |
apt install -y wget linux-headers-$(uname -r) build-essential libglvnd-dev pkg-config dkms | |
DOWNLOAD_URL="https://us.download.nvidia.com/XFree86/Linux-x86_64/515.76/NVIDIA-Linux-x86_64-515.76.run" |
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
# Required config | |
# $ export ANSIBLE_SCP_IF_SSH=False | |
# $ export ANSIBLE_SSH_ARGS="-F /home/USERNAME/.ssh/teleport.cfg" | |
# $ export ANSIBLE_INVENTORY_ENABLED=yaml | |
# $ export ANSIBLE_HOST_KEY_CHECKING=false | |
--- | |
- hosts: all | |
gather_facts: true | |
become: true |
NewerOlder