Skip to content

Instantly share code, notes, and snippets.

View someara's full-sized avatar

Sean OMeara someara

View GitHub Profile
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';
package 'foo' fo
action :install
end
template '/etc/foo' do
notifies :restart, 'service[foo]'
end
# this will be started, then restarted on the first chef-client run
service 'foo' do
#
# Cookbook Name:: myface
# Recipe:: default
#
# Copyright (C) 2012 Sean OMeara
#
# Apache 2 license
#
user 'myface'
unless ::File.exists('/asdljasdljkasdlkajsd') do
file "/tmp/hello" do
content "hi there\n"
end
end
vs
file "/tmp/hello" do
content "hi there\n"
derpy:~$ gem install vagrant
Building native extensions. This could take a while...
ERROR: Error installing vagrant:
ERROR: Failed to build gem native extension.
/Users/someara/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
checking for re.h... no
checking for ruby/st.h... yes
creating Makefile
derpy:~$ ssh ubuntu@176.34.36.150
Welcome to Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-29-virtual i686)
* Documentation: https://help.ubuntu.com/
System information as of Mon Sep 24 21:23:53 UTC 2012
System load: 0.01 Processes: 66
Usage of /: 9.0% of 9.99GB Users logged in: 1
Memory usage: 14% IP address for eth0: 10.152.151.236
# a recipe is a unit of intent.
include_recipe "custom_app::torrent_thefile"
# testing for a condition it the compile phase...
# the is not normally necessary.
unless File.dirname(node['custom_app']['thefile']).exists?
include_recipe "custom_app::server"
end