Skip to content

Instantly share code, notes, and snippets.

View someara's full-sized avatar

Sean OMeara someara

View GitHub Profile
root@localhost:~# shef -s
loading configuration: none (standalone shef session)
Session type: solo
Loading.[2013-01-19T19:22:31+00:00] INFO: Run List is []
[2013-01-19T19:22:31+00:00] INFO: Run List expands to []
done.
This is shef, the Chef shell.
Chef Version: 10.18.0
http://www.opscode.com/chef
@someara
someara / gist:4552006
Created January 16, 2013 23:28
I got 99 resources in my converge run.
99/99: -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_,------,
99/99: -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_| /\_/\
0/99: -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^|__( - .-)
0/99: -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- "" ""
@someara
someara / gist:4449461
Created January 4, 2013 02:38
ohai slackberry
root@slackberry:~# time ohai
{
"languages": {
"ruby": {
"platform": "arm-linux-eabi",
"version": "1.9.3",
"release_date": "2012-04-20",
"target": "arm-slackware-linux-gnueabi",
"target_cpu": "arm",
"target_vendor": "slackware",
template "/tmp/file1" do
action :create
# mode "00666"
notifies :create, 'template[/tmp/file2]'
end
template "/tmp/file2" do
action :nothing
notifies :run, 'execute[hack the planet]'
end
#
# Cookbook Name:: line
# Recipe:: default
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
[root@myface vagrant]# chef-solo -c /tmp/vagrant-chef-1/solo.rb -j /tmp/vagrant-chef-1/dna.json --why-run --color
Starting Chef Client, version 10.16.2
Compiling cookbooks
.................................done.
Converging 108 resources
108/108: -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-__,------,
108/108: -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-__| /\_/\
0/108: -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_~|_( - .-)
0/108: -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ "" ""
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 21:32 ? 00:00:00 /sbin/init
root 2 0 0 21:32 ? 00:00:00 [kthreadd]
root 3 2 0 21:32 ? 00:00:00 [ksoftirqd/0]
root 6 2 0 21:32 ? 00:00:00 [migration/0]
root 7 2 0 21:32 ? 00:00:00 [watchdog/0]
root 8 2 0 21:32 ? 00:00:00 [migration/1]
root 10 2 0 21:32 ? 00:00:00 [ksoftirqd/1]
root 12 2 0 21:32 ? 00:00:00 [watchdog/1]
root 13 2 0 21:32 ? 00:00:00 [cpuset]
@someara
someara / wtf
Created December 5, 2012 01:12
chef:recipe > search(:role, "name:*") do |r|
chef:recipe > puts r.inspect
chef:recipe ?> end
=> true
chef:recipe >
Welcome to MyFace!
<html><head><title>MyFace Users</title></head><body>
<?php
$db_host = 'localhost';
$db_user = 'root';
$db_pwd = '<%= node['mysql']['server_root_password'] %>';
$database = 'myface';
$table = 'users';
#
# Cookbook Name:: myface
# Recipe:: default
#
# Copyright (C) 2012 Sean OMeara
#
# Apache 2 license
#
user 'myface'