Skip to content

Instantly share code, notes, and snippets.

View chrisbelyea's full-sized avatar
🚩
protocols > platforms

Chris Belyea chrisbelyea

🚩
protocols > platforms
View GitHub Profile
@chrisbelyea
chrisbelyea / cfn_nested_stack_example.yaml
Created February 24, 2021 13:22
Infrastructure as Code at Enterprise Scale
AWSTemplateFormatVersion: "2010-09-09"
Resources:
LoadBalancer:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: "https://exampleco-cfn-templates.s3.us-east-2.amazonaws.com/alb/com.example.alb-1.77.2.yaml"
Parameters:
Scheme: internet-facing
@chrisbelyea
chrisbelyea / centos7.cfg
Last active March 21, 2018 12:57
Kickstart
#version=DEVEL
# System authorization information
auth --enableshadow --passalgo=sha512
# Use CDROM installation media
#cdrom
# Use online installation media
url --url="http://mirror.cogentco.com/pub/linux/centos/7/os/x86_64/"
# Use graphical install
graphical
# Run the Setup Agent on first boot
@chrisbelyea
chrisbelyea / index.txt
Last active March 14, 2018 18:53
A Git Workflow Using `rebase`
Why Squash?
1: <script src="https://gist.github.com/chrisbelyea/90146b7d6c1a67b072347d418154dbb5.js?file=why_squash_1.md"></script>
2: <script src="https://gist.github.com/chrisbelyea/90146b7d6c1a67b072347d418154dbb5.js?file=why_squash_2.md"></script>
3: <script src="https://gist.github.com/chrisbelyea/90146b7d6c1a67b072347d418154dbb5.js?file=why_squash_3.md"></script>
Setup
2: <script src="https://gist.github.com/chrisbelyea/90146b7d6c1a67b072347d418154dbb5.js?file=setup_2.md"></script>
3: <script src="https://gist.github.com/chrisbelyea/90146b7d6c1a67b072347d418154dbb5.js?file=setup_3.md"></script>
4: <script src="https://gist.github.com/chrisbelyea/90146b7d6c1a67b072347d418154dbb5.js?file=setup_4.md"></script>
@chrisbelyea
chrisbelyea / why_squash_1.md
Last active March 14, 2018 18:16
Why Squash? 1
4d7269c (HEAD -> issue-1) added missing semicolon, lol
ae37a28 my code is broken
30cd73d syntax error ugh
cf5ff68 syntax error2
44962e5 syntax error
26a6423 Broke linter
2a9a75d Fix issue in method
7d0be0e Get tests passing
bd23847 Add some more code
@chrisbelyea
chrisbelyea / robbyrussell-terraform.zsh-theme
Created November 17, 2017 14:54
Default zsh robbyrussel theme with Terraform prompt added
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"
PROMPT='${ret_status} %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)$(tf_prompt_info)'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
@chrisbelyea
chrisbelyea / tags.groovy
Last active June 22, 2017 22:05
Jenkins Active Choices Groovy code to enumerate Git tags
// This snippet enumerates the tags in a GitHub repository and returns them as a java.util.ArrayList
// so they can be used with Jenkins' Active Choices plugin. It doesn't require any additional libraries to be
// loaded.
def tagsUrl = 'http://api.github.com/repos/org/repo/tags' // use the correct GitHub API URL here--this isn't it
def data = new URL(tagsUrl).getText()
def list = new groovy.json.JsonSlurper().parseText(data)
def releases = []
// This is *NOT* idiomatic Groovy, but all of the "proper" ways I found to iterate over the list

Keybase proof

I hereby claim:

  • I am chrisbelyea on github.
  • I am chrisbelyea (https://keybase.io/chrisbelyea) on keybase.
  • I have a public key ASB0k0jUkOjurzfJAoe8eb8lcHthDgjFGX90Wx2eHsVHsAo

To claim this, I am signing this object:

@chrisbelyea
chrisbelyea / secedit.ini
Last active August 29, 2015 14:24
Example output from secedit /export /cfg
[Unicode]
Unicode=yes
[System Access]
MinimumPasswordAge = 1
MaximumPasswordAge = 60
MinimumPasswordLength = 14
PasswordComplexity = 1
PasswordHistorySize = 24
LockoutBadCount = 5
ResetLockoutCount = 15
@chrisbelyea
chrisbelyea / gist:2200445
Created March 25, 2012 22:34
Output of 'type gem'
gem is a function
gem ()
{
typeset result;
( typeset rvmrc;
for rvmrc in /etc/rvmrc "${HOME:-}/.rvmrc";
do
[[ -s "${rvmrc}" ]] && source "${rvmrc}" || true;
done;
command gem "$@" ) || result=$?;
@chrisbelyea
chrisbelyea / gem_env_output.txt
Created March 25, 2012 22:23
output of 'gem env'
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.17
- RUBY VERSION: 1.9.3 (2012-02-16 patchlevel 125) [x86_64-linux]
- INSTALLATION DIRECTORY: /home/chris/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd
- RUBY EXECUTABLE: /home/chris/.rvm/rubies/ruby-1.9.3-p125/bin/ruby
- EXECUTABLE DIRECTORY: /home/chris/.rvm/gems/ruby-1.9.3-p125@rails3tutorial2ndEd/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS: