Skip to content

Instantly share code, notes, and snippets.

Avatar

Christopher Rigor crigor

View GitHub Profile
@crigor
crigor / audit.rules
Created Sep 17, 2018 — forked from Neo23x0/audit.rules
Linux Auditd Best Practice Configuration
View audit.rules
# ___ ___ __ __
# / | __ ______/ (_) /_____/ /
# / /| |/ / / / __ / / __/ __ /
# / ___ / /_/ / /_/ / / /_/ /_/ /
# /_/ |_\__,_/\__,_/_/\__/\__,_/
#
# Linux Audit Daemon - Best Practice Configuration
# /etc/audit/audit.rules
#
# Compiled by Florian Roth
@crigor
crigor / connect.rb
Created Sep 28, 2016
Modified version of tpol's script. Uses mysql2 gem.
View connect.rb
#!/usr/bin/ruby
# gem install mysql2 -v 0.3.12b6
#require 'mysql'
require 'mysql2'
def usage
puts "USAGE: connect.rb <connections> [<runtime>]"
exit
View after_stopping_docker_container_manually.txt
ip-10-144-55-138 cookbooks # PATH=/usr/local/ey_resin/bin:$PATH /home/ey/bin/chef-solo -j /etc/chef-custom/dna.json -c /root/docker_cookbooks/solo.rb
[2016-07-04T02:56:15+00:00] INFO: Forking chef instance to converge...
Starting Chef Client, version 12.7.2
[2016-07-04T02:56:15+00:00] INFO: *** Chef 12.7.2 ***
[2016-07-04T02:56:15+00:00] INFO: Chef-client pid: 13474
[2016-07-04T02:56:17+00:00] INFO: Setting the run_list to recipe[main] from CLI options
[2016-07-04T02:56:17+00:00] INFO: Run List is [recipe[main]]
[2016-07-04T02:56:17+00:00] INFO: Run List expands to [main]
[2016-07-04T02:56:17+00:00] INFO: Starting Chef Run for i-518fbcd6
[2016-07-04T02:56:17+00:00] INFO: Running start handlers
View gist:32289256f55cbc91977f725f1a9398f1
ip-10-144-55-138 cookbooks # PATH=/usr/local/ey_resin/bin:$PATH /home/ey/bin/chef-solo -j /etc/chef-custom/dna.json -c /root/docker_cookbooks/solo.rb
[2016-07-04T02:52:51+00:00] INFO: Forking chef instance to converge...
Starting Chef Client, version 12.7.2
[2016-07-04T02:52:51+00:00] INFO: *** Chef 12.7.2 ***
[2016-07-04T02:52:51+00:00] INFO: Chef-client pid: 12220
[2016-07-04T02:52:53+00:00] INFO: Setting the run_list to recipe[main] from CLI options
[2016-07-04T02:52:53+00:00] INFO: Run List is [recipe[main]]
[2016-07-04T02:52:53+00:00] INFO: Run List expands to [main]
[2016-07-04T02:52:53+00:00] INFO: Starting Chef Run for i-518fbcd6
[2016-07-04T02:52:53+00:00] INFO: Running start handlers
@crigor
crigor / gist:5722270
Created Jun 6, 2013
output of vagrant up using the ansible provisioner
View gist:5722270
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'vagrant-debian-wheezy'...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
@crigor
crigor / gist:5711873
Created Jun 5, 2013
vagrant up output when using the ansible provisioner
View gist:5711873
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'vagrant-debian-wheezy'...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Fixed port collision for 22 => 2222. Now on port 2200.
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
View gist:5671882
$ vagrant up
Bringing machine 'db' up with 'virtualbox' provider...
Bringing machine 'app' up with 'virtualbox' provider...
[db] Importing base box 'vagrant-debian-wheezy'...
[db] Matching MAC address for NAT networking...
[db] Setting the name of the VM...
[db] Clearing any previously set forwarded ports...
[db] Fixed port collision for 22 => 2222. Now on port 2202.
[db] Creating shared folders metadata...
[db] Clearing any previously set network interfaces...
View gist:5671292
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'vagrant-debian-wheezy'...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Fixed port collision for 22 => 2222. Now on port 2200.
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
@crigor
crigor / eydeploy.rb
Created Aug 29, 2011 — forked from nevans/eydeploy.rb
how to use private git repos with bundler at Engine Yard
View eydeploy.rb
# put this into your config/eydeploy.rb
def bundle
if File.exist?("#{c.release_path}/Gemfile")
info "~> Gemfile detected, bundling gems"
lockfile = File.join(c.release_path, "Gemfile.lock")
bundler_installer = if File.exist?(lockfile)
get_bundler_installer(lockfile)
else
warn_about_missing_lockfile
View config.ru
# Because Unicorn is such a brilliant piece of software, it wraps older,
# non-Rack versions of Rails in a Rack handler. That way Unicorn
# itself can target Rack and not have to worry about monkey patching
# Rails' dispatcher.
#
# This means we can do the same, and even more.
#
# Starting Rackhub locally:
#
# Thin: