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/ruby | |
require 'socket' | |
# AWS API Credentials | |
AWS_ACCESS_KEY_ID = "your-aws-access-key-id" | |
AWS_SECRET_ACCESS_KEY = "your-aws-secret-access-key" | |
# Node details | |
NODE_NAME = "webserver-01.example.com" |
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
apt-get -y update | |
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev libxslt-dev libxml2-dev git | |
cd /tmp | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p429.tar.gz | |
tar -xvzf ruby-1.9.3-p429.tar.gz | |
cd ruby-1.9.3-p429/ | |
./configure --prefix=/usr/local | |
make | |
make install | |
gem install bundler berkshelf |
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
# to Couchbase: please release Debian binaries | |
# to end users: save yourself an afternoon. below works on fresh Debian Wheezy 7.0.0-2 amd64 | |
# author https://www.linkedin.com/in/peterstyk | |
# license bsd | |
sudo apt-get update | |
sudo apt-get upgrade -y | |
sudo apt-get install -y build-essential python-dev python-pip libevent-dev openjdk-7-jre curl unzip | |
wget http://packages.couchbase.com/clients/c/libcouchbase-2.3.2.tar.gz | |
tar -xzf libcouchbase-2.3.2.tar.gz |
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 -v | |
# Ubuntu Xenial Initialization from Cloud-Init or Vagrant | |
# From Ubuntu user | |
# Maintained by Peter Styk ([email protected]) | |
# PREREQUESITES | |
pushd /tmp | |
sudo wget -q -O - https://jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add - | |
sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list' | |
sudo apt-get update |
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
Options +Indexes | |
<Files ~ "^.*\.([Hh][Tt][Aa])"> | |
order allow,deny | |
deny from all | |
</Files> | |
<IfModule mod_autoindex.c> | |
IndexOptions IgnoreCase FancyIndexing FoldersFirst NameWidth=* DescriptionWidth=* SuppressHTMLPreamble | |
IndexIgnore cgi-bin header.html footer.html .ftpquota |
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
# Example of using an InitContainer in place of a GitRepo volume. | |
# Unilke GitRepo volumes, this approach runs the git command in a container, | |
# with the associated hardening. | |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: git-repo-demo | |
annotations: | |
seccomp.security.alpha.kubernetes.io/pod: 'docker/default' | |
spec: |
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/php | |
<?php | |
$repos = array(); | |
exec('find -type d -name .git | sed -e "s/\.git//"', $repos); | |
foreach ($repos as $repo) { | |
$status = shell_exec("cd $repo && git status"); | |
if (false == strpos($status, 'nothing to commit (working directory clean)')) { | |
echo "$repo\n" . str_repeat('-', strlen($repo)) . "\n$status\n\n"; | |
} | |
} |
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
#// Start of script | |
#// Get year and month for csv export file | |
$DateTime = Get-Date -f "yyyy-MM" | |
#// Set CSV file name | |
$CSVFile = "C:\AD_Groups"+$DateTime+".csv" | |
#// Create emy array for CSV data | |
$CSVOutput = @() | |
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
locals { | |
some_list_of_ips = [ | |
"127.0.0.1", | |
"127.0.0.2", | |
"127.0.0.3" | |
] | |
} | |
resource "openstack_networking_port_v2" "test-adp" { |
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
resource "openstack_networking_network_v2" "network_1" { | |
name = "network_1" | |
} | |
resource "openstack_networking_subnet_v2" "subnet_1" { | |
name = "subnet_1" | |
network_id = "${openstack_networking_network_v2.network_1.id}" | |
cidr = "192.168.1.0/24" | |
ip_version = 4 | |
enable_dhcp = true |
OlderNewer