Skip to content

Instantly share code, notes, and snippets.

@takumn
takumn / gist:5114132
Last active December 14, 2015 16:19
Install Chef on Amazon Linux
sudo su -

Packages Installation

yum -y update
yum -y groupinstall "Development Tools"
yum -y install readline-devel openssl-devel zlib-devel curl-devel ncurses-devel gdbm-devel sqlite-devel

Ruby Intallation with rbenv

require 'formula'
class Mysql56 < Formula
homepage 'http://dev.mysql.com/doc/refman/5.6/en/'
url 'http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.10.tar.gz/from/http://cdn.mysql.com/'
version '5.6.10'
sha1 'f37979eafc241a0ebeac9548cb3f4113074271b7'
# bottle do
# sha1 '3c5b57df466eb538db58654c5f046ddf7bc675e9' => :mountainlion
boost::filesystem::ifstream ifs;
boost::filesystem::path filepath(path);
ifs.open(filepath/filename);
std::string line;
std::istream is(&ifs);
while(getline(is, line)) {
msgpack::unpacked msg;
msgpack::unpack(&msg, line.data(), line.size());