user@laptop:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.1 LTS
Release: 12.04
Codename: precise
user@laptop:~$ certutil -d ~/.mozilla/firefox/fk9tyf55.default -L
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EC 11.1.x has a bug [OC-11384] when an LDAP user attempts to create a new account | |
that has never existed in the Enterprise Chef database before, rather than linking | |
with an existing internal user. | |
Please apply the attached patch to your EC 11.1.x release: | |
$ cd /opt/opscode/embedded/service/gem/ruby/1.9.1/bundler/gems/mixlib-authorization-c03f584a371b | |
$ patch -p1 < /tmp/cache/ec11.1-ldap500error.patch | |
patching file lib/opscode/models/user.rb | |
$ private-chef-ctl restart opscode-account |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; init.el --- Where all the magic begins | |
;; | |
;; This file loads Org-mode and then loads the rest of our Emacs | |
;; initialization from Emacs lisp embedded in literate Org-mode files. | |
;; Load up Org Mode and (now included) Org Babel for elisp embedded in | |
;; Org Mode files | |
(setq dotfiles-dir (file-name-directory (or (buffer-file-name) load-file-name))) | |
(let* ((org-dir (expand-file-name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
XTerm*faceName: Pragmata | |
XTerm*faceSize: 10 | |
XTerm*background: grey13 | |
XTerm*foreground: grey75 | |
XTerm*cursorColor: darkorange1 | |
XTerm*scrollBar: false | |
XTterm*utf8: 2 | |
XTerm*metaSendsEscape: true | |
XTerm*eightBitInput: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
def find_deps(cookbook_dir) | |
nel = Hash.new { |h, k| h[k] = [] } | |
Dir.glob("#{cookbook_dir}/*/").each do |r| | |
deps_for(r, nel) | |
end | |
nel | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
z = 3 * 0x41662d2d * 123750872726249 | |
o = [] | |
puts z.to_s(16) | |
while z != 0 | |
# let's eat through z one byte at a time | |
l = z >>4 &0xf #shift right then AND with 16 to get the character | |
r = z &0xf #just AND with 16 to get the XORed with l position in the array | |
o[r^l]=(l + 97).chr #put the character in the correct spot in the array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Veewee::Session.declare( { | |
:cpu_count => '1', :memory_size=> '384', | |
:disk_size => '10140', :disk_format => 'VDI', | |
:os_type_id => 'RedHat', | |
:iso_file => "CentOS-6.0-i386-bin-DVD.iso", :iso_src => "", :iso_md5 => "d7e57d6edaca1556d5bad2fa88602309", :iso_download_timeout => 1000, | |
:boot_wait => "10",:boot_cmd_sequence => ['<Esc>', 'linux text ks=http://%IP%:%PORT%/ks.cfg<Enter>'], | |
:kickstart_port => "7122", :kickstart_timeout => 10000,:kickstart_file => "ks.cfg", | |
:ssh_login_timeout => "100",:ssh_user => "vagrant", :ssh_password => "vagrant",:ssh_key => "", | |
:ssh_host_port => "7222", :ssh_guest_port => "22", | |
:sudo_cmd => "echo '%p'|sudo -S sh '%f'", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e -x | |
echo "Setting up base system" | |
REMOTE_SCRIPT="https://raw.github.com/gist/2573056/74237aada624251de7ddfe5e8b98a6e39f736e43/base_setup.sh" | |
wget -nv -O - "$REMOTE_SCRIPT" | bash | |
echo "Setting up Chef" | |
#REMOTE_SCRIPT="http://codecafe.com/chef/ec2_client_setup.sh" | |
REMOTE_SCRIPT="http://git.io/chefclientsetup.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash - | |
curl -H "Content-Type: application/json" localhost:5984/chef | |
curl -H "Content-Type: application/json" -X POST http://localhost:5984/chef/_compact | |
sleep 3 | |
for VIEW in nodes roles registrations clients data_bags data_bags_items users checksums cookbooks sandboxes environments id_map; do | |
curl -H "Content-Type: application/json" -X POST http://localhost:5984/chef/_compact/$VIEW |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!./bin/knife exec | |
# A knife exec script to change chef node's name, preserving all the attributes. | |
# | |
# Usage: knife exec rename-node.rb old-name new-name | |
# | |
# Script retrieves the Node object, changes its 'name' attribute, | |
# creates new Node object with updated name and rest of attributes | |
# untouched. Then it deletes old Node and Client objects from | |
# database, and logs into the server to update it: |
OlderNewer