Skip to content

Instantly share code, notes, and snippets.

View relaxdiego's full-sized avatar
🤓

Mark Maglana relaxdiego

🤓
  • The Linux Foundation
  • Earth, Solar System, Milky Way, Laniakea
View GitHub Profile
>>> from my_klass import my_klass
>>> from mocker import Mocker
>>> mocker = Mocker()
# Prepare the mock methods
>>> target = mocker.mock()
>>> target.method1(12) # doctest: +ELLIPSIS
<mocker.Mock object at ...>
>>> mocker.result(5)
>>> target.method2(12) # doctest: +ELLIPSIS
log --graph --pretty=oneline --abbrev-commit --decorate --color --all

git-flow completion requires git-completion to work. How exactly you go about installing git-completion varies wildly from system to system, so it's hard to give exact installation instructions.

OS X

By far the easiest way to install both Git and git-completion is via Homebrew, so you should pick that one.

Homebrew

  1. Install homebrew
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
module Aviator
define_request :create_tenant do
meta :provider, :openstack
meta :service, :identity
meta :api_version, :v2
meta :endpoint_type, :admin
link 'documentation',
#!/usr/bin/env ruby
class Fixnum
def +(other)
2
end
end
puts 1 + 1 + 1
@relaxdiego
relaxdiego / lexer.rdsl
Last active December 23, 2015 00:59
Initial implementation of self-testing ManaMana (Do doo be-do-do!). I think it's cool that I can do this now. On the other hand, the .tdsl file below feels like an extra/unnecessary step. Clearly, ManaMana, is not well suited as a unit-testing tool which is fine because, when I wrote the gem, I imagined its use as an acceptance tool for a web ap…
RDSL Lexer
==========
* It tokenizes
```
This is a group name
====================
```
into
```
[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
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
@relaxdiego
relaxdiego / readme.adoc
Created May 18, 2017 17:41 — forked from arun-gupta/readme.adoc
Kubernetes Cluster on AWS
  1. kops: https://github.com/kubernetes/kops

    1. Getting Started Guide: https://github.com/kubernetes/kops/blob/master/docs/aws.md

    2. Installing Kubernetes on AWS with kops: https://kubernetes.io/docs/getting-started-guides/kops/

    3. Mulit-master Kubernetes Cluster on AWS with kops: http://blog.arungupta.me/multimaster-kubernetes-cluster-amazon-kops/

    4. Booting Kubernetes on Amazon Elastic Compute with kops: https://deis.com/docs/workflow/quickstart/provider/aws/boot/

    5. Setting up an HA Kubernetes Cluster in AWS with private topology with kops 1.5.1: https://www.nivenly.com/kops-1-5-1/

    6. Kubernetes on AWS: https://daemonza.github.io/2017/01/15/kubernetes-on-aws/

    7. Your 2nd day with Kubernetes on AWS: https://www.nivenly.com/2nd-hour/

  2. Tectonic (Terraform): http://github.com/coreos/tectonic-installer