Skip to content

Instantly share code, notes, and snippets.

apiVersion: v1
kind: Service
metadata:
labels:
name: cassandra
name: cassandra
spec:
ports:
- port: 9042
selector:
apiVersion: v1
kind: ReplicationController
metadata:
labels:
name: cassandra-2
name: cassandra-2
spec:
replicas: 1
selector:
name: cassandra
apiVersion: v1
kind: ReplicationController
metadata:
labels:
name: cassandra-1
name: cassandra-1
spec:
replicas: 1
selector:
name: cassandra
@rafael
rafael / ArcanistScalastyleLinter.php
Created December 11, 2014 19:11
Scala Phabricator Linter
<?php
// source: https://secure.phabricator.com/D10405
// author: josh-newman
final class ArcanistScalastyleLinter extends ArcanistExternalLinter {
private $jarPath = null;
private $configPath = null;
public function getInfoURI() {
return 'http://www.scalastyle.org/';
ee565277f836: Pushing [================================> ] 7.67 MB/11.93 MB 34s
2014/06/28 17:17:37 Failed to upload layer: Put https://registry-1.docker.io/v1/images/ee565277f836cef00fce06a5b9ffde760a2932f7b76f63226924d049187bc40c/layer: read tcp 107.22.52.107:443: i/o timeout
{
"kind": "cluster#pod",
"id": "redis-master",
"labels": {
"name": "redis-master"
},
"desiredState": {
"manifest": {
"version": "",
"volumes": null,
@rafael
rafael / maybe_example.rb
Last active August 29, 2015 14:01
Issue with Maybe
# Null Object Pattern:
# http://devblog.avdi.org/2011/05/30/null-objects-and-falsiness/
require 'delegate'
RUBY_VERSION # => "2.0.0"
class NullObject
def method_missing(*args, &block)
self
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIBlackColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGKSpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKcHCBMXGyImVSRudWxs1QkKCwwNDg8QERJcTlNDb21wb25lbnRzVU5TUkdCXE5T
Q29sb3JTcGFjZV8QEk5TQ3VzdG9tQ29sb3JTcGFjZVYkY2xhc3NPECgwLjAyNzQ1MTAw
NjcgMC4yMTE3NjQ3MjMxIDAuMjU4ODIzNDg0MiAxTxAoMC4wMzkzODA3NDc4MiAwLjE2
# Description:
# Utility commands to enable/disable and show status of continuous deployment.
#
# Commands:
# hubot continuous deployment disable - Disables continuous deployment
# hubot continuous deployment enable - Enables continuous deployment
# hubot continuous deployment status- Displays the status of continuous deployment
util = require 'util'
querystring = require('querystring');
module.exports = (robot) ->
@rafael
rafael / routes.rb
Created November 5, 2013 21:53
Imprenta routes example
get 'mystatic-pages/:id', :to => Imprenta.server