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
#cloud-config | |
packages: | |
- apt-transport-https | |
- ca-certificates | |
apt_sources: | |
- source: deb https://apt.dockerproject.org/repo ubuntu-xenial main | |
keyserver: 'hkp://p80.pool.sks-keyservers.net:80' | |
keyid: 58118E89F3A912897C070ADBF76221572C52609D |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
Copyright (C) 2014 Leo Iannacone <info@leoiannacone.com> | |
This file was generated from a textmate theme named Monokai Extended | |
with tm2gtksw2 tool. (Alexandre da Silva) | |
This library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Library General Public | |
License as published by the Free Software Foundation; either |
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
--- | |
- name: nodejs install block | |
block: | |
- name: Check for nodejs | |
stat: | |
path: "{{ node_path }}/node" | |
register: node_check | |
- name: Install nodejs | |
unarchive: |
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
[[monokai-soda]] | |
palette = "#1a1a1a:#f4005f:#98e024:#fa8419:#9d65ff:#f4005f:#58d1eb:#c4c5b5:#625e4c:#f4005f:#98e024:#e0d561:#9d65ff:#f4005f:#58d1eb:#f6f6ef" | |
background_color = "#1a1a1a" | |
cursor_color = "#f6f7ec" | |
foreground_color = "#c4c5b5" | |
background_image = None | |
background_darkness = 0.8 | |
background_type = transparent | |
font = Monospace 11 | |
scrollback_lines = 5000 |
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
#cloud-config | |
users: | |
- name: <username> | |
groups: sudo | |
shell: /bin/bash | |
sudo: ['ALL=(ALL) NOPASSWD:ALL'] | |
ssh-authorized-keys: | |
- <enter_public_key_here> |
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 makeSalt() { | |
# Create variable length passwords | |
LC_CTYPE=C; | |
local saltine=$(tr -dc 'A-Za-z0-9_@#$%^&*~!?;`./|:{} <>[]()-+=' < /dev/urandom | head -c 64) | |
if [[ $(echo ${saltine} | grep -P '({%|%}|{#|#}|{{|}}|##)') ]]; then | |
makeSalt; | |
else | |
echo "${saltine}"; | |
fi | |
} |
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 randNum() { | |
# Generate random number of variable length with a default of 5 digits | |
local val | |
local len=${1:-5} | |
for (( x=0; x<${len}; x++ )); do | |
val+=($(echo $((RANDOM%9)))); | |
done | |
printf -- "%s" "${val[@]}" | |
} |
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 command finds the most recent tag that is reachable from a commit. | |
# If the tag points to the commit, then only the tag is shown. | |
# Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object | |
# and the abbreviated object name of the most recent commit. | |
git describe | |
# With --abbrev set to 0, the command can be used to find the closest tagname without any suffix: | |
git describe --abbrev=0 | |
# other examples |
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
[Unit] | |
Description=consul-template | |
Requires=network-online.target | |
After=network-online.target consul.service vault.service | |
[Service] | |
EnvironmentFile=-/etc/sysconfig/consul-template | |
Restart=on-failure | |
ExecStart=/usr/local/sbin/consul-template $OPTIONS -config=/etc/consul-template.d |
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
[Unit] | |
Description=consul agent | |
Requires=network-online.target | |
After=network-online.target | |
[Service] | |
EnvironmentFile=-/etc/sysconfig/consul | |
Environment=GOMAXPROCS=2 | |
Restart=on-failure | |
ExecStart=/usr/local/sbin/consul agent $OPTIONS -config-dir=/etc/consul.d |
OlderNewer