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
--- | |
- hosts: cd-servers | |
gather_facts: no | |
sudo: true | |
user: deploy | |
tasks: | |
- name: Install Couchdb dependencies | |
yum: name={{ item }} state=installed | |
with_items: | |
- autoconf |
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
package org.kafecho.learning.parser | |
import scala.util.parsing.combinator.RegexParsers | |
import java.net.URI | |
sealed trait SdpValue | |
sealed trait Username | |
case class UserLogin(login: String) extends Username | |
case object UserIdsNotSupported extends Username |
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
[httpd] | |
bind_address = 0.0.0.0 |
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
$p = Start-Process -FilePath "C:\Users\Guillaume\couchdb.exe" -ArgumentList "/VerySilent /CLOSEAPPLICATIONS /Log=C:\couchdb.txt" -Wait -PassThru | |
$p.WaitForExit() | |
if ($p.ExitCode -ne 0) { | |
throw "failed" | |
} |
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
/** | |
* Work in progress.... | |
* Let's try to port Eric Bidelman's demo (http://html5-demos.appspot.com/static/media-source.html) to ScalaJS. | |
* This is mostly a learning exercise. | |
* Only tested on Google Chrome (on OS X Yosemite). | |
*/ | |
package tutorial.webapp | |
import scala.scalajs.js.JSApp |
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
--- | |
- name: cache the rpms required to install HAProxy | |
shell: repotrack -p {{ rpms_root }} haproxy |
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
--- | |
- name: install HAProxy | |
shell: yum install -y haproxy --disablerepo=* --enablerepo=ansible | |
- name: customize HAProxy to serve HTTP traffic to the designated downstream servers | |
template: src=haproxy.cfg.j2 dest=/etc/haproxy/haproxy.cfg owner=haproxy group=haproxy | |
notify: restart_haproxy | |
- name: ensure HAProxy is started and enabled at boot time | |
service: name=haproxy state=started enabled=yes |
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
[ansible] | |
name=Ansible | |
baseurl=http://{{ deployment_node_ip }}/rpms | |
enabled=1 | |
gpgcheck=0 |
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
--- | |
- name: Downloading and enable the EPEL repository definitions. | |
action: command rpm -Uvh --replacepkgs http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm |
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
trait TimeUnit | |
case object msecs extends TimeUnit | |
case object nanosecs extends TimeUnit | |
object Watch{ | |
/* A hashmap to map a time unit to a tuple containing: | |
* - a description of the time unit in english. | |
* - a function invoked to measure the time in the given unit | |
*/ | |
val timeUnits = Map[TimeUnit,Tuple2[String,() => Long]] ( | |
msecs -> ("msecs",System.currentTimeMillis _), |
OlderNewer