Skip to content

Instantly share code, notes, and snippets.

View someara's full-sized avatar

Sean OMeara someara

View GitHub Profile
@someara
someara / gist:3229740
Created August 1, 2012 18:49
pkgin return status fail
[root@393b16b ~]# pkgin -y install lkajsdlkajsd ; echo $?
lkajsdlkajsd is not available on the repository
calculating dependencies... done.
nothing to do.
0
begin
require 'nokogiri'
rescue LoadError
Chef::Log.warn("Libraries in the SMF cookbook depend on chef_gem 'nokogiri'. Please include_recipe 'smf::default' before attempting to use them.")
end
# 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
derpy:~$ ssh [email protected]
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
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
unless ::File.exists('/asdljasdljkasdlkajsd') do
file "/tmp/hello" do
content "hi there\n"
end
end
vs
file "/tmp/hello" do
content "hi there\n"
#
# Cookbook Name:: myface
# Recipe:: default
#
# Copyright (C) 2012 Sean OMeara
#
# Apache 2 license
#
user 'myface'
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';
@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 >