Skip to content

Instantly share code, notes, and snippets.

@elon01
elon01 / gist:69e57d1e3a0967af1ead
Last active October 19, 2015 13:54
Atlanta Essentials 19OCT15
Chris 1 | 52.91.174.60 |
Chris 2 | 54.84.57.117 |
Chris 3 | 52.91.159.88 |
========================================================
Matt 1 | 54.175.248.60 |
Matt 2 | 54.175.248.5 |
Matt 3 | 54.175.248.50 |
========================================================
Drew 1 | 54.175.247.242 |
Drew 2 | 54.175.247.197 |
Daniel Smith
52.6.88.187
Eric Franson
52.6.88.183
Gert van Emmenes
52.6.87.136
@elon01
elon01 / gist:6dad43d9707e6d8e3f58
Last active August 29, 2015 14:07
custom.erb as seen by Apache
Listen 81
<VirtualHost *:81>
ServerAdmin webmaster@localhost
DocumentRoot /srv/apache/bears
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
@elon01
elon01 / gist:16142d3e6867b1bfa8c8
Last active August 29, 2015 14:07
Custom.erb solution
<% if @port != 80 -%>
Listen <%= @port %>
<% end -%>
<VirtualHost *:<%= @port %>>
ServerAdmin webmaster@localhost
DocumentRoot <%= @document_root %>
<Directory />
Options FollowSymLinks
@elon01
elon01 / custom.erb
Last active January 26, 2018 18:20
custom.erb for Apache Configuration - Chef Fundamentals course (Online Edition)
# NOTE: The instructions are below in the Apache code, surrounded by hash (#) symbols.#
# When replacing instructions with a variable, remove the comments, including the hash symbols #
# Please remove these instructions too!#
<% if @port != 80 -%> #this line is an example of what to do below#
Listen <%= #put_port_variable_here# %> #the ruby evaluation tags are correct, but you need to put in the 'port' variable#
<% end -%>
<VirtualHost *:#put_port_variable_here# > #replace the 'port' variable, including ruby evaluation tags to print the value#
ServerAdmin webmaster@localhost
package "apache2"
service "apache2" do
action [ :enable, :start ]
end
aardir = "Chef::Config[:file_cache_path]"
aarfile = "#{aardir}/master.zip"
aarapp = "Awesome-Appliance-Repair-master"
@elon01
elon01 / gist:8240755
Created January 3, 2014 16:20
Chef-client output
opscode@domU-12-31-39-09-C5-DF:~$ sudo chef-client
[sudo] password for opscode:
Starting Chef Client, version 11.8.2
resolving cookbooks for run list: ["apache", "motd", "users"]
Synchronizing Cookbooks:
- apache
- motd
- pci
- users
Compiling Cookbooks...
@elon01
elon01 / gist:8240616
Created January 3, 2014 16:14
Elons data bags
/Users/elonbarevan/chef-repo/data_bags/users --> cat frank.json
{
"id":"frank",
"comment":"Frank Belson",
"uid":"2001",
"gid":"0",
"home":"/home/frank",
"shell":"/bin/bash"
}