Skip to content

Instantly share code, notes, and snippets.

View lancewf's full-sized avatar
🏠
Working from home

Lance Finfrock lancewf

🏠
Working from home
View GitHub Profile
@lancewf
lancewf / i3.config
Created March 29, 2020 15:40
i3 config
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
### Keybase proof
I hereby claim:
* I am lancewf on github.
* I am lancewf (https://keybase.io/lancewf) on keybase.
* I have a public key ASAOOj9qCGJ_h2_h1dX2yf-Yuz0HWhV03wi7flYeNDM7Xgo
To claim this, I am signing this object:
{
"version": "2.30.0",
"profiles": [
{
"name": "ssh",
"title": "Basic SSH",
"maintainer": "Chef Software, Inc.",
"copyright": "Chef Software, Inc.",
"copyright_email": "support@chef.io",
"license": "Proprietary, All rights reserved",
@lancewf
lancewf / aws-env
Created April 29, 2019 19:05
Export aws environment variable from creds
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import argparse
import configparser
import os
import sys
CREDENTIALS_PATH = "~/.aws/credentials"
@lancewf
lancewf / gist:4cfb32094c91e09413f43c74dd975d9b
Created March 29, 2019 18:53
InSpec report failure webhook notification
{
"type":"compliance_failure",
"total_number_of_tests":18,
"total_number_of_skipped_tests":14,
"total_number_of_passed_tests":2,
"total_number_of_failed_tests":2,
"number_of_failed_critical_tests":1,
"number_of_critical_tests":16,
"node_uuid":"9b9f4e51-b049-4b10-9555-10578916e112",
"node_name":"redhat(2)-alpha-nginx(f)-apache(f)-failed",
@lancewf
lancewf / gist:19a1735bbfe27ab9180af0ea738b75df
Created March 29, 2019 18:37
Chef client run failure webhook notification
{
"type":"converge_failure",
"start_time_utc":"2016-06-28T20:05:29.000000Z",
"node_name":"insights.chef.co",
"failure_snippet":"Chef client run failure on [example.com] insights.chef.co : https://a2-dev.test/client-runs/0271e125-97dd-498a-b026-8448ee60aafe/runs/ba6acb91-1eaa-4c84-8d68-f19ee641e606\nError executing action `create` on resource 'file[/failed/file/resource]'\nfile[/failed/file/resource] (insights-test::default line 26) had an error: Chef::Exceptions::EnclosingDirectoryDoesNotExist: Parent directory /failed/file does not exist. \n",
"exception_title":"Error executing action `create` on resource 'file[/failed/file/resource]'",
"exception_message":"file[/failed/file/resource] (insights-test::default line 26) had an error: Chef::Exceptions::EnclosingDirectoryDoesNotExist: Parent directory /failed/file does not exist.",
"exception_backtrace":[
"/Users/bob/projects/chef/lib/chef/mixin/why_run.rb:240:in `run'",
"/Users/bob/projects/chef/lib/chef/mixin/why_run.rb:321:in `
@lancewf
lancewf / hab_helpers.sh
Last active June 4, 2020 17:21
hab_helpers
# This removes the visual mode when select text with the mouse in vim.
echo "set mouse-=a" >> ~/.vimrc
function auto_run ()
{
[[ "$WATCH" == "" ]] && WATCH="./";
install_if_missing core/inotify-tools inotifywait;
echo "watching folder: $WATCH"
green "##################################################"
green "############### First time running ###############";
#!/bin/bash
hab pkg install chef/ci-studio-common >/dev/null
source "$(hab pkg path chef/ci-studio-common)/bin/studio-common"
# This removes the visual mode when select text with the mouse in vim.
echo "set mouse-=a" >> ~/.vimrc
function auto_run() {
[[ "$WATCH" == "" ]] && WATCH="./"
curl https://raw.githubusercontent.com/habitat-sh/habitat/master/components/hab/install.sh | bash
adduser --group hab
useradd -g hab hab
Add the below to the systemd file: /lib/systemd/system/hab.service
```
[Unit]
#!/bin/bash
eval "$(curl -s -L https://gist.githubusercontent.com/lancewf/6b58d3accb36c2ae5681a40bd574b124/raw/4c8a9e6dc725b9b4fa62a96f5770e3946dde8437/hab_studio_addition)"
export MYSQL_PORT=3306
export MMSN_PORT=8080
export PHP_PORT=9000
export MONEY_CHECKER_SERVER_PORT=8081
export WIKI_PORT=8082
export WHALEDISENTANGLEMENT_HOME_PORT=8083