This file contains hidden or 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 is Git's per-user configuration file. | |
[user] | |
# Please adapt and uncomment the following lines: | |
name = Your Name | |
email = <[email protected]> | |
[core] | |
editor = emacs | |
[alias] | |
# List all aliases | |
la = "!git config -l | grep alias | cut -c 7-" |
This file contains hidden or 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 python | |
""" | |
Install R Packages from the command line | |
Usage: (parse app.R) | |
./rpkg app.R | |
Usage: (install R packages) | |
./rpkg shiny V8 plyr | |
""" |
This file contains hidden or 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 | |
# Installs Puppet on CentOS 7 | |
# @todo - check GPG key | |
RPM=$(which rpm) | |
CENTOS_REPO_URL="https://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm" | |
GPG_PUBKEY="http://pool.sks-keyservers.net:11371/pks/lookup?op=get&search=0x1054B7A24BD6EC30" | |
function install_centos_repo() { | |
$RPM -ivh $CENTOS_REPO_URL |
This file contains hidden or 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
[root@ctpuppetconsole01 ~]# find / -name 'puppet' -type d | |
========================================================= | |
/var/opt/lib/pe-puppet/lib/puppet | |
/opt/puppet | |
/opt/puppet/share/puppet | |
/opt/puppet/share/puppet/modules/pe_concat/lib/puppet | |
/opt/puppet/share/puppet/modules/reboot/lib/puppet | |
/opt/puppet/share/puppet/modules/pe_staging/spec/unit/puppet | |
/opt/puppet/share/puppet/modules/pe_staging/lib/puppet | |
/opt/puppet/share/puppet/modules/pe_inifile/spec/unit/puppet |
This file contains hidden or 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 | |
SRC_CONF="/etc/puppetlabs/puppet/puppet.conf" | |
SSL_DIR="/etc/puppetlabs/puppet/ssl" | |
sed -i "s/ctpuppetmaster01/ctpuppetconsole02/" $SRC_CONF | |
mv -f "${SSL_DIR}" "${SSL_DIR}.pe" | |
mv -f /etc/puppetlabs/mcollective/ssl /etc/puppetlabs/mcollective/ssl.pe | |
#systemctl stop pe-mcollective | |
service pe-mcollective stop | |
puppet agent --test --debug --noop | |
exit 0; |
This file contains hidden or 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 | |
# wget <raw_url> | |
# chmod +x init.sh | |
# ./init.sh | |
if [ "${EUID}" != "0" ]; then | |
echo "You must be root" | |
exit 1; | |
fi |
This file contains hidden or 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 python | |
""" | |
Creates a list of hosts from a CSV export of nodes | |
Usage: ./check_pe_csv path/to/csvfile | |
""" | |
import csv | |
import os | |
import sys |
This file contains hidden or 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
""" | |
* Carrotland | |
* ========== | |
* | |
* The rabbits are free at last, free from that horrible zombie science experiment. They need a happy, safe home, where they can recover. | |
* | |
* You have a dream, a dream of carrots, lots of carrots, planted in neat rows and columns! But first, you need some land. And the only person who's selling land is Farmer Frida. Unfortunately, not only does she have only one plot of land, she also doesn't know how big it is - only that it is a triangle. However, she can tell you the location of the three vertices, which lie on the 2-D plane and have integer coordinates. | |
* | |
* Of course, you want to plant as many carrots as you can. But you also want to follow these guidelines: The carrots may only be planted at points with integer coordinates on the 2-D plane. They must lie within the plot of land and not on the boundaries. For example, if the vertices were (-1,-1), (1,0) and (0,1), then you can plant only one carrot at (0,0). | |
* |
This file contains hidden or 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 alpine:3.6 | |
RUN apk update && apk add --no-cache bind | |
VOLUME ["/data"] | |
WORKDIR /data | |
ENTRYPOINT ["/usr/sbin/named-checkzone"] |
This file contains hidden or 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 application is running |