Skip to content

Instantly share code, notes, and snippets.

View HighwayofLife's full-sized avatar
🥷
Jedi

David Lewis HighwayofLife

🥷
Jedi
View GitHub Profile
@HighwayofLife
HighwayofLife / rename_module.sh
Created September 8, 2012 21:57
Rename/Duplicate PyroCMS Module Bash Script
#!/bin/bash
##
# Script created by David Lewis ([email protected]) for PyroCMS
# This script will rename an existing (core) CMS module and duplicate it into the
# addons/shared_addons/modules directory, while renaming it and all file contents to
# match
#
# Usage: ./rename_module.sh "old_module" "new_module"
#
#!/bin/sh
#
# Too many crusty old git branches? Run this to find likely candidates for deletion
# It lists all the remote branches and sorts them by age.
#
# Folks at pivotal shared this with me
#
#$ . show-remote-branch-info.sh
# 2012-05-04 09:42:29 -0700 4 minutes ago Ted & Bill \torigin/hey_Bill
@HighwayofLife
HighwayofLife / crash.log
Created April 15, 2017 00:30
Terraform Crash on Azurerm Template Deployment for Azure Service Fabric
This file has been truncated, but you can view the full file.
2017/04/14 19:41:37 [INFO] Terraform version: 0.9.2 6365269541c8e3150ebe638a5c555e1424071417+CHANGES
2017/04/14 19:41:37 [INFO] Go runtime version: go1.8
2017/04/14 19:41:37 [INFO] CLI args: []string{"/opt/terraform/terraform", "apply"}
2017/04/14 19:41:37 [DEBUG] Detected home directory from env var: /var/lib/jenkins
2017/04/14 19:41:37 [DEBUG] Detected home directory from env var: /var/lib/jenkins
2017/04/14 19:41:37 [DEBUG] Attempting to open CLI config file: /var/lib/jenkins/.terraformrc
2017/04/14 19:41:37 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2017/04/14 19:41:37 [INFO] CLI command args: []string{"apply"}
2017/04/14 19:41:37 [DEBUG] command: loading backend config file: /var/lib/jenkins/workspace/TerraformSFCluster/cicd-azure
2017/04/14 19:41:37 [DEBUG] command: no data state file found for backend config
@HighwayofLife
HighwayofLife / debug.log
Created May 17, 2017 19:00
Terraform resource azurerm_network_interface won't import
2017/05/17 11:55:20 [INFO] Terraform version: 0.9.5
2017/05/17 11:55:20 [INFO] Go runtime version: go1.8.1
2017/05/17 11:55:20 [INFO] CLI args: []string{"/usr/local/Cellar/terraform/0.9.5/bin/terraform", "import", "azurerm_network_interface.test", "/subscriptions/xxxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/MyResourceGroup/providers/microsoft.network/networkInterfaces/jenkinsmaster314"}
2017/05/17 11:55:20 [DEBUG] Detected home directory from env var: /Users/myself
2017/05/17 11:55:20 [DEBUG] Detected home directory from env var: /Users/myself
2017/05/17 11:55:20 [DEBUG] Attempting to open CLI config file: /Users/myself/.terraformrc
2017/05/17 11:55:20 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2017/05/17 11:55:20 [INFO] CLI command args: []string{"import", "azurerm_network_interface.test", "/subscriptions/xxxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/MyResourceGroup/providers/microsoft.network/networkInterfaces/jenkinsmaster314"}
2017/05/17 11:55:20 [DEBUG] Detected home di
@HighwayofLife
HighwayofLife / storage_account.tf
Last active June 9, 2017 04:16
Azure Storage Account Unique Name
variable "storageAccountPrefix" {
default = "node"
}
variable "resourceGroupName" {
default = "MyResourceGroup"
}
variable "location" {
default = "West US"
}
variable "nodeCount" {
@HighwayofLife
HighwayofLife / service_fabric.tf
Created June 9, 2017 04:32
Passing Storage Account Endpoints to ARM Templates
variable "resourceGroupName" {
default = "myResourceGroup"
}
variable "location" {
default = "West US"
}
variable "clusterName" {
default = "servicefabcluster"
}
variable "nodeCount" {
@HighwayofLife
HighwayofLife / docker-cleanup-resources.md
Created March 13, 2018 20:12 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@HighwayofLife
HighwayofLife / git_clone_all_org_repos.sh
Created March 17, 2018 06:39
Git Clone all Github Organization Repositories in a single command
#!/bin/sh
ORG="deck15"
curl -s https://api.github.com/orgs/$ORG/repos?per_page=200 | jq -r '.[].ssh_url' | xargs -I {} git clone {}
@HighwayofLife
HighwayofLife / README.md
Created March 22, 2018 08:42 — forked from qoomon/TravisGitHub.md
Setup GitHub Deploy Keys For Travis

Setup Travis Deploy

gem install travis

ssh-keygen -t rsa -b 4096 -f 'github_deploy_key' -N ''

cat github_deploy_key.pub | pbcopy

set public key as deploy key on github e.g https://github.com/USER/REPO/settings/keys

rm 'github_deploy_key.pub'

@HighwayofLife
HighwayofLife / Makefile
Created July 2, 2018 16:35 — forked from mpneuried/Makefile
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)