Skip to content

Instantly share code, notes, and snippets.

View kjellski's full-sized avatar
🤓
learning every day...

Kjellski kjellski

🤓
learning every day...
View GitHub Profile
#!/bin/bash
# Description: Using Docker (requires docker to be installed http://www.docker.io/gettingstarted/ ), spawn a postgresql instance and a dynamically configured treeio instance
# Author: Adam Awan
# Email: adam@tree.io
# Create a PostgreSQL Instance
echo "Retrieving jpetazzo/pglite PostgreSQL Container..."
docker pull jpetazzo/pglite
echo "Running jpetazzo/pglite PostgreSQL Container..."
PGID=$(docker run -d jpetazzo/pglite)
object FizzBuzz extends App {
val nones = Stream.continually(None)
val fizzes: Stream[Option[String]] = nones.take(2) ++ Some("Fizz") #:: fizzes
val buzzes: Stream[Option[String]] = nones.take(4) ++ Some("Buzz") #:: buzzes
for (((fizz, buzz), n) <- fizzes zip buzzes zip (1 to 100)) {
println(fizz.map(_ + buzz.getOrElse("")).orElse(buzz).getOrElse(n))
}
@kjellski
kjellski / install.sh
Last active December 16, 2015 04:18 — forked from padcom/install.sh
#!/bin/bash
#------------------------------------------------------------------------------
# SETTINGS
#------------------------------------------------------------------------------
MYSQL_ROOT_PASSWORD=password
MYSQL_GITORIOUS_PASSWORD=password
GITORIOUS_HOST=gitorious
SYSADMIN=sysadmin
This file has been truncated, but you can view the full file.
'use strict';
var COMPILED = !0, goog = goog || {};
goog.global = this;
goog.DEBUG = !1;
goog.LOCALE = "en";
goog.provide = function (a) {
if (!COMPILED) {
if (goog.isProvided_(a))
throw Error('Namespace "' + a + '" already declared.');
delete goog.implicitNamespaces_[a];
@kjellski
kjellski / install.sh
Last active December 13, 2015 19:18 — forked from padcom/install.sh
#!/bin/bash
#------------------------------------------------------------------------------
# SETTINGS
#------------------------------------------------------------------------------
MYSQL_ROOT_PASSWORD=password
MYSQL_GITORIOUS_PASSWORD=password
GITORIOUS_HOST=gitorious
SYSADMIN=sysadmin
@kjellski
kjellski / install.sh
Created October 17, 2012 14:40 — forked from criminy/install.sh
A pax-run profile for karaf 2.3.0
mvn install:install-file -DgroupId=org.ops4j.pax.runner.profiles -DartifactId=karaf.shell -Dversion=2.3.0 -Dfile=karaf.shell.composite -Dpackaging=composite