Skip to content

Instantly share code, notes, and snippets.

View robertwe's full-sized avatar
💭
https://github.com/kelseyhightower/kubernetes-the-hard-way

Robert W robertwe

💭
https://github.com/kelseyhightower/kubernetes-the-hard-way
View GitHub Profile
@robertwe
robertwe / nginx
Created November 10, 2017 10:27
nginx.conf
# Statics
location /(bundles|css|fonts|images|js) {
access_log off;
expires 30d;
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET';
try_files $uri =404;
}
@robertwe
robertwe / values_pointers.go
Created October 10, 2017 23:51 — forked from josephspurrier/values_pointers.go
Golang - Asterisk and Ampersand Cheatsheet
/*
********************************************************************************
Golang - Asterisk and Ampersand Cheatsheet
********************************************************************************
Also available at: https://play.golang.org/p/lNpnS9j1ma
Allowed:
--------
p := Person{"Steve", 28} stores the value
@robertwe
robertwe / Makefile
Created August 4, 2017 04:11 — forked from pgporada/Makefile
Terraform Makefile
.ONESHELL:
.PHONEY: help set-env init update plan plan-destroy show graph apply output taint
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
set-env:
@if [ -z $(ENVIRONMENT) ]; then\
echo "ENVIRONMENT was not set"; exit 10;\
fi
[root@localhost ~]# augtool ls /files/boot/grub/grub.conf
#comment[1] = grub.conf generated by anaconda
#comment[2] = Note that you do not have to rerun grub after making changes to this file
#comment[3] = NOTICE: You have a /boot partition. This means that
#comment[4] = all kernel and initrd paths are relative to /boot/, eg.
#comment[5] = root (hd0,0)
#comment[6] = kernel /vmlinuz-version ro root=/dev/mapper/VolGroup-lv_root
#comment[7] = initrd /initrd-[generic-]version.img
#comment[8] = boot=/dev/sda
default = 0
@robertwe
robertwe / sysctl.pp
Created December 27, 2016 00:25
auges
augeas { "sysctl":
context => '/files/etc/sysctl.conf',
changes => [
'set kernel.keys.root_maxkeys 1000000',
],
}
@robertwe
robertwe / augues.pp
Created December 27, 2016 00:16
augeas puppet
augeas { 'grub_conf':
incl => '/boot/grub/grub.conf',
lens => 'grub.lns',
changes => [
'set default 0',
'setm title[1]/kernel swapaccount 1',
'rm title[1]/kernel/quiet',
'rm title[1]/kernel/rhgb'
],
require => Package['kernel-lt']
resource "aws_vpc" "vpc" {
cidr_block = "${var.environment["vpc_cidr"]}"
enable_dns_hostnames = true
enable_dns_support = true
instance_tenancy = "default"
tags {
Name = "${var.environment["name"]}-vpc"
TF = "YES"
}
@robertwe
robertwe / jenkins-job-dsl.groovy
Created May 4, 2016 19:23 — forked from stuartstevenson/jenkins-job-dsl.groovy
Jenkins job dsl with distributed job config files. The seed.groovy file scans stash repo branches for jenkins-job-dsl.groovy files and runs them centrally.
Closure job = {
// Job Name
name "${stashProjectKey}-${projectName}-${branchSimpleName}"
// Where should jenkins run the job
label ('master')
// Where should Jenkins get the source code from
scm {
git {
@robertwe
robertwe / 0_reuse_code.js
Created April 26, 2016 08:54
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@robertwe
robertwe / log
Last active August 29, 2015 14:03
yum provides
$ yum provides /usr/bin/host
Loaded plugins: fastestmirror
...
32:bind-utils-9.8.2-0.17.rc1.el6_4.6.x86_64 : Utilities for querying DNS name servers
Repo : base
Matched from:
Filename : /usr/bin/host
32:bind-utils-9.8.2-0.23.rc1.el6_5.1.x86_64 : Utilities for querying DNS name servers
Repo : updates