This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
version: '2' | |
services: | |
connect: | |
image: confluentinc/cp-server-connect:5.4.1 | |
hostname: connect | |
container_name: connect | |
ports: | |
- 8083:8083 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cats.data.NonEmptyList | |
import cats.Eq | |
import scala.collection.GenTraversableOnce | |
sealed trait NonEmptySet[T] extends (T => Boolean) { | |
def head: T | |
def set: Set[T] | |
def +(t: T): NonEmptySet[T] | |
def ++(ts: NonEmptySet[T]): NonEmptySet[T] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case class Food(ingredients: Seq[String]) | |
class Chef[Pizza <: Chef.Pizza] protected (ingredients: Seq[String]) { | |
import Chef.Pizza._ | |
def addCheese(cheeseType: String): Chef[Pizza with Cheese] = Chef(ingredients :+ cheeseType) | |
def addTopping(toppingType: String): Chef[Pizza with Topping] = Chef(ingredients :+ toppingType) | |
def addDough: Chef[Pizza with Dough] = Chef(ingredients :+ "dough") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2013-2015 Andrew Snare, Age Mooij | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */ | |
/* ========================================================================== | |
HTML5 display definitions | |
========================================================================== */ | |
/** | |
* Correct `block` display not defined in IE 8/9. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BTW yum has last Redis too, remi repository at least. | |
$ sudo -i | |
$ yum list redis | |
$ redis.x86_64 2.6.13-1.el6.remi remi | |
But today we want compile redis from source (see http://redis.io/download) | |
$ yum install make gcc tcl | |
$ cd /usr/local/src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage: clusterctl start|stop | |
# | |
# Launches a local RabbitMQ cluster | |
# | |
# The name returned by `hostname -s` must resolve to 127.0.0.1 | |
CLUSTER_SIZE=4 | |
NODENAME_PREFIX='rmq' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Copyright 2012-2021 Viktor Klang | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// quick and dirty argument parsing | |
foreach ($argv as $arg) { | |
if ($arg == '-f') { | |
define('FOLLOW', true); | |
} | |
if ($arg == '-h') { | |
define('HISTOGRAM', true); | |
} |
NewerOlder