Skip to content

Instantly share code, notes, and snippets.

View res0nat0r's full-sized avatar
🤗

Stefhen Hovland res0nat0r

🤗
  • Austin, TX
View GitHub Profile
@res0nat0r
res0nat0r / create-aws-console-user.sh
Created October 7, 2015 16:00 — forked from stefhen/create-aws-console-user.sh
Create AWS console user from the awscli
#!/bin/bash
# USAGE: ./create-aws-console-user.sh $GROUPNAME $USERNAME $PASSWORD
# http://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html#id_users_create_cliwpsapi
# Create administrator group
aws iam create-group --group-name $1
@res0nat0r
res0nat0r / haproxy.rb
Created March 9, 2017 20:38 — forked from stefhen/haproxy.rb
generate haproxy.cfg with chef
# Wrapper cookbook snippet and upstream cookbook here: https://github.com/sous-chefs/haproxy
haproxy_lb 'backend-service-name-here' do
params([
'bind 0.0.0.0:80',
'mode http',
'balance roundrobin',
'option forwardfor',
'option http-server-close'
])
@res0nat0r
res0nat0r / s3.json
Created March 9, 2017 20:39 — forked from stefhen/s3.json
Grant access to a single s3 bucket and nothing else.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1475614069000",
"Effect": "Allow",
"Action": [
"s3:*"
],
"Resource": [
@res0nat0r
res0nat0r / migrate.txt
Created March 9, 2017 20:39 — forked from stefhen/migrate.txt
Migrage Chef Client from old Chef Server to new Chef Server
http://stackoverflow.com/questions/28806585/how-to-migrate-from-one-chef-server-to-another-chef-server
There are multiple steps here and some information is needed from you to better answer your question.
Assumptions
Your nodes are Linux nodes and you are still working in the Chef 11 version.
Your new chef server has all of the cookbooks, roles, data bags and environments moved over from your old chef server.
Steps
@res0nat0r
res0nat0r / delete_all_object_versions.sh
Created September 30, 2017 21:07 — forked from weavenet/delete_all_object_versions.sh
Delete all versions of all files in s3 versioned bucket using AWS CLI and jq.
#!/bin/bash
bucket=$1
set -e
echo "Removing all versions from $bucket"
versions=`aws s3api list-object-versions --bucket $bucket |jq '.Versions'`
markers=`aws s3api list-object-versions --bucket $bucket |jq '.DeleteMarkers'`
@res0nat0r
res0nat0r / pedantically_commented_playbook.yml
Created November 17, 2017 17:06 — forked from marktheunissen/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
@res0nat0r
res0nat0r / Install NVIDIA Driver and CUDA.md
Created December 20, 2017 00:58 — forked from wangruohui/Install NVIDIA Driver and CUDA.md
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
@res0nat0r
res0nat0r / 2-bindings
Last active January 11, 2018 05:15 — forked from Soft/keys
vim for mpd / ncmpcpp
Located in ~/.ncmpcpp/bindings
key_move_song_up = 'K'
key_move_song_down = 'J'
key_next_found_position = 'n'
key_prev_found_position = 'N'
key_prev_column = 260 'h'
key_next_column = 261 'l'
key_lyrics = '.'
key_home = 262 'g'
@res0nat0r
res0nat0r / how-to-install-latest-gcc-on-ubuntu-lts.txt
Created March 12, 2018 05:48 — forked from application2000/how-to-install-latest-gcc-on-ubuntu-lts.txt
How to install latest gcc on Ubuntu LTS (12.04, 14.04, 16.04)
These commands are based on a askubuntu answer http://askubuntu.com/a/581497
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below.
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING.
ABSOLUTELY NO WARRANTY.
If you are still reading let's carry on with the code.
sudo apt-get update && \
sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
@res0nat0r
res0nat0r / readme.md
Created January 28, 2019 04:14 — forked from maxivak/readme.md
Provisioning Docker containers with Chef

Provisioning Docker container with Chef

Chef provisioning

  • Chef provisioning is a framework that allows clusters to be managed by the chef-client and the Chef server in the same way nodes are managed: with recipes.

  • Chef provisioning is a collection of resources that enable the creation of machines and machine infrastructures using the chef-client.