Skip to content

Instantly share code, notes, and snippets.

View nathenharvey's full-sized avatar

Nathen Harvey nathenharvey

View GitHub Profile
@nathenharvey
nathenharvey / attributes.rb
Created November 26, 2013 03:38
A quick cookbook for installing maldetect
# cookbooks/maldetect/attributes/attributes.rb
default["maldetect"]["version"] = "1.4.2"
default["maldetect"]["checksum"] = "e118760d2440832564ac72977abb95a6141c25b520f21dfa30a89e1f6c835d63"
@nathenharvey
nathenharvey / startup.sh
Created June 4, 2019 06:14
nginx startup script
#! /bin/bash
apt-get update
apt-get install -y nginx
service nginx start
sed -i -- 's/nginx/Google Cloud Platform - '"$HOSTNAME"'/' /var/www/html/index.nginx-debian.html
FROM node:12.3.1
EXPOSE 8080
COPY server.js .
CMD node server.js
var http = require('http');
var handleRequest = function(request, response) {
response.writeHead(200);
response.end("Hello World!");
}
var www = http.createServer(handleRequest);
www.listen(8080);
#! /bin/bash
gcloud compute instance-groups managed create nginx-group \
--base-instance-name nginx \
--size 2 \
--template nginx-template \
--target-pool nginx-pool

Keybase proof

I hereby claim:

  • I am nathenharvey on github.
  • I am nathenharvey (https://keybase.io/nathenharvey) on keybase.
  • I have a public key ASA20KLLVgTgpZkHio5RYm86jLeHWKy_hiKtCpHrYIAG-Ao

To claim this, I am signing this object:

@nathenharvey
nathenharvey / chef-functions.psm1
Last active April 17, 2018 20:53
Some powershell functions to ease some common knife commands
function Bootstrap-SSH {
param (
$name,
$env,
$cookbook,
$recipe
)
Write-Output "Bootstrapping host $name into $env with recipe $cookbook::$recipe"
knife bootstrap $name -N $name -E $env -r "'''recipe[$cookbook::$recipe]'''" -i ~/.ssh/id_rsa -x ubuntu --sudo -y
@nathenharvey
nathenharvey / log-debug.txt
Created March 19, 2018 18:00
Sensitive property on execute resource
$ chef-client -z sensitive.rb -l debug
[2018-03-19T13:54:21-04:00] DEBUG: Sleeping for 0 seconds
[2018-03-19T13:54:21-04:00] INFO: Started chef-zero at chefzero://localhost:1 with repository at /Users/nathenharvey
One version per cookbook
[2018-03-19T13:54:21-04:00] DEBUG: Running Ohai with the following configuration: {}
[2018-03-19T13:54:21-04:00] INFO: Forking chef instance to converge...
[2018-03-19T13:54:21-04:00] DEBUG: Fork successful. Waiting for new chef pid: 15310
[2018-03-19T13:54:21-04:00] DEBUG: Forked instance now converging

INCIDENT DATE - INCIDENT TYPE

Meeting

Meeting Participants

Incidents should be scheduled within 24 hours or two business days of incident resolution. Keep the following in mind when scheduling the meeting:

  1. Who is required to attend the postmortem?
pkg_origin=firstnamelastname
pkg_name=mytutorialapp
pkg_version=0.2.0
pkg_maintainer="The Habitat Maintainers <humans@habitat.sh>"
pkg_license=()
pkg_upstream_url=https://github.com/habitat-sh/habitat-example-plans
pkg_source=nosuchfile.tar.gz
pkg_deps=(core/node)
pkg_exports=(
[port]=listening_port