I hereby claim:
- I am sjourdan on github.
- I am sjourdan (https://keybase.io/sjourdan) on keybase.
- I have a public key whose fingerprint is 31D1 CFDB DF8F 1B53 82A1 2FCF 204B F835 CEFF 35EF
To claim this, I am signing this object:
namespace :ec2 do | |
# setup chef config | |
# assumes this file is sibling to .chef dir, ex: CHEF_REPO/tasks | |
config = File.join(File.dirname(__FILE__), '..', '.chef', 'knife.rb') | |
Chef::Config.from_file(config) | |
require 'active_support' | |
require 'aws' | |
desc 'Delete any ec2-based chef nodes that no longer exist' |
git reset --soft HEAD~1 |
search(:node, "chef_environment:dev") do |matching_node| | |
puts matching_node.to_s | |
end |
#!/bin/bash | |
PATHPATCH="/root/patch-ovh" | |
PATHRCS="/etc/default" | |
PATHCHECK="/etc/init.d" | |
PATHINITTAB="/etc" | |
ECHO="/bin/echo" | |
APTGET="/usr/bin/apt-get" | |
WGET="/usr/bin/wget" | |
RM="/bin/rm" |
I hereby claim:
To claim this, I am signing this object:
Source: http://www.opsreportcard.com/.
<% if @port != 80 -%> | |
Listen <%= @port %> | |
<% end -%> | |
<VirtualHost *:<%= @port %>> | |
ServerAdmin webmaster@localhost | |
DocumentRoot <%= @document_root %> | |
<Directory /> | |
Options FollowSymLinks |
#cloud-config | |
users: | |
- name: demo | |
sudo: ['ALL=(ALL) NOPASSWD:ALL'] | |
groups: sudo | |
shell: /bin/bash | |
chef: | |
install_type: "omnibus" |
This is going to be another scripting challenge.... you may use any language tools you want to solve it.
The task is to create two scripts (or one script with a symlink, whatevs) that will take as its only argument a 4 bit integer value (0-15) and create a file with a path based on the bit pattern. The directories should be created with the most significant bit first and will be named either "0" or "1" depending on the value of the bit in that position.
The first script should be called /usr/local/bin/seta and will use /var/math/a as its root directory. The second script will be /usr/local/bin/setb and use /var/math/b for its root. So, calling /usr/local/bin/seta 10 should create the directory /var/math/a/1/0/1/0/. Any files in the subdirectories will be ignored.
Your script should clear its target directory (/var/math/[a|b]) before writing files to ensure that data from previous runs will be removed. A third script called /usr/local/bin/adder has been provided and will add