An introduction to curl using GitHub's API
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
development: | |
adapter: mysql2 | |
encoding: utf8 | |
database: my_database | |
username: root | |
password: |
#!/usr/bin/perl | |
# HAProxy Performance Statistics | |
# by Steve Kamerman | |
# | |
# To use, pipe your HAProxy log with timing information (like "0/0/1/1/3 200") to | |
# this script. It will output min, max, med, avg and a latency distribution graph. | |
# | |
# Info on timing logging in HAProxy: http://code.google.com/p/haproxy-docs/wiki/TimingEvents | |
# |
There is a long standing issue in Ruby where the net/http library by default does not check the validity of an SSL certificate during a TLS handshake. Rather than deal with the underlying problem (a missing certificate authority, a self-signed certificate, etc.) one tends to see bad hacks everywhere. This can lead to problems down the road.
From what I can see the OpenSSL library that Rails Installer delivers has no certificate authorities defined. So, let's go fetch some from the curl website. And since this is for ruby, why don't we download and install the file with a ruby script?
Chef Metal now supports LXC! All the benefits of Metal, including idempotent, versioned, reusable cluster definitions can be realized. You can use LXC containers for testing, or you can use them as a part of your application stack. You can now write a Metal recipe like so:
chef-metal is still alpha software. People are experimenting with it and contributing to it, but it is still evolving.
require 'chef_metal_lxc'
#!/bin/bash | |
### BEGIN INIT INFO | |
# INIT INFO | |
# Provides: docker | |
# Required-Start: networking | |
# Required-Stop: networking | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: docker |
!/bin/bash | |
### BEGIN INIT INFO | |
# INIT INFO | |
# Provides: docker | |
# Required-Start: networking | |
# Required-Stop: networking | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: docker |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
BOX_NAME = ENV['BOX_NAME'] || "Centos6.4" | |
BOX_URI = ENV['BOX_URI'] || "http://shonky.info/centos64.box" | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| |
#!/usr/bin/env python | |
# -*- coding: utf8 | |
from random import choice | |
fortunes = ["“Welcome” is a powerful word.", | |
"A dubious friend may be an enemy in camouflage.", | |
"A feather in the hand is better than a bird in the air. (2)", | |
"A fresh start will put you on your way.", | |
"A friend asks only for your time not your money.", | |
"A friend is a present you give yourself.", | |
"A gambler not only will lose what he has, but also will lose what he doesn’t have.", |
-- This is a Hive program. Hive is an SQL-like language that compiles | |
-- into Hadoop Map/Reduce jobs. It's very popular among analysts at | |
-- Facebook, because it allows them to query enormous Hadoop data | |
-- stores using a language much like SQL. | |
-- Our logs are stored on the Hadoop Distributed File System, in the | |
-- directory /logs/randomhacks.net/access. They're ordinary Apache | |
-- logs in *.gz format. | |
-- | |
-- We want to pretend that these gzipped log files are a database table, |