Follow these steps to install graphite on OS X Mavericks.
- Homebrew
- Python 2.7
- Git
demo: | |
provider: openstack | |
auth_service: | |
name: identity | |
host_uri: http://192.168.42.11:5000 | |
request: create_token | |
validator: list_tenants | |
api_version: v3 |
class TestSuite: | |
@patch('real_class_name') | |
def test_case(self, mock_class): | |
# Delay the evaluation of Mock() so that we get | |
# a new mock object for each time the (mocked) | |
# class constructor is called. | |
def new_mock_obj(*args, **kwargs): | |
mock_obj = Mock() | |
mock_obj.some_function.return_value = 'w00t' |
# git completion | |
source /usr/local/etc/bash_completion.d/git-completion.bash | |
source /usr/local/etc/bash_completion.d/git-prompt.sh | |
# unstaged (*) and staged (+) changes | |
# export GIT_PS1_SHOWDIRTYSTATE=1 | |
# If something is stashed, then a '$' will be shown next to the branch name | |
# export GIT_PS1_SHOWSTASHSTATE=1 |
RB.Object = { | |
// Douglas Crockford's technique for object extension | |
// http://javascript.crockford.com/prototypal.html | |
create: function(){ | |
function F(){} | |
F.prototype = arguments[0]; | |
var obj = new F(); | |
// Add all the other arguments as mixins that | |
// 'write over' any existing methods |
[1] guard(main)> Run options: --seed 2796 | |
# Running tests: | |
. | |
Finished tests in 0.001458s, 685.8711 tests/s, 685.8711 assertions/s. | |
1 tests, 1 assertions, 0 failures, 0 errors, 0 skips |
RDSL Lexer | |
========== | |
* It tokenizes | |
``` | |
This is a group name | |
==================== | |
``` | |
into | |
``` |
#!/usr/bin/env ruby | |
class Fixnum | |
def +(other) | |
2 | |
end | |
end | |
puts 1 + 1 + 1 |
module Aviator | |
define_request :create_tenant do | |
meta :provider, :openstack | |
meta :service, :identity | |
meta :api_version, :v2 | |
meta :endpoint_type, :admin | |
link 'documentation', |
require 'formula' | |
class Dblatex < Formula | |
url 'http://downloads.sourceforge.net/project/dblatex/dblatex/dblatex-0.3/dblatex-0.3.tar.bz2' | |
homepage 'http://dblatex.sourceforge.net' | |
md5 '7de6bf72b8b2934169ce0ec911e966ed' | |
def install | |
system "python", "setup.py", "install", "--prefix=#{prefix}", "--install-scripts=#{bin}" | |
end |