This file contains hidden or 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
| # Bash Command Runner | |
| # bash_command_runner.sh | |
| # jason.giedymin@gmail.com | |
| # ApacheV2 | |
| # | |
| # Helpers | |
| # ------- | |
| # f(x) runner | |
| function run() { |
This file contains hidden or 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 | |
| DOCKERNAME="ansibleshipyard/ansible-????" | |
| DOCKER_DIR="dockerfiles" | |
| TAGS=(ubuntu centos ???) | |
| CONTEXT=. | |
| usage() { | |
| local tag=$1 |
This file contains hidden or 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 | |
| # | |
| # Author: Jason Giedymin <jasong@apache.org> | |
| # Copyright 2014 Jason Giedymin | |
| # License: Apache2 | |
| # | |
| # Basic goswitch script to swtich between two gopath roots. | |
| # This script can be useful if you have a basic structure | |
| # and your build scripts don't have knowledge of where | |
| # your golibs are installed. |
This file contains hidden or 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
| // Apache2 License | |
| // Author: Jason Giedymin | |
| // ### Requires | |
| var packageFile = require('./package'); | |
| var gulp = require('gulp'); | |
| var rimraf = require('gulp-rimraf'); | |
| var zip = require('gulp-zip'); | |
| var docco = require("gulp-docco"); | |
| var mocha = require('gulp-mocha'); |
This file contains hidden or 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 slick | |
| /** | |
| * This is some code extracted from TimeOut codebase, demonstrating: | |
| * - Use of tag typed to avoid mixing session of different DB | |
| * - The use of the Reader Monad to compose Actions together and defer the choice of async/sync computation | |
| * | |
| * I remove the part where we can say if our operation are read only or not (to use different connection), in order to | |
| * make things easier. | |
| **/ |
This file contains hidden or 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
| description "Mesos Master" | |
| start on runlevel [2345] | |
| stop on starting rc RUNLEVEL=[016] | |
| respawn | |
| respawn limit 2 5 | |
| env MESOS_CONFIG="/etc/mesos/conf" | |
| env MESOS_HOME="/usr/local/lib" |
This file contains hidden or 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 | |
| java_binary_link="/usr/bin/java" | |
| java_library="libjvm.so" | |
| library_paths=( | |
| /jre/lib/amd64/server | |
| /jre/lib/amd64/client | |
| /usr/lib | |
| /lib |
This file contains hidden or 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
| # Vagrant Quick Cluster | |
| nodes = [ | |
| { :hostname => 'vmci', :cpus => 1, :mem => 256, :ip => '172.168.0.100', :box => 'vm_ci', :url => '../precise64.box' }, | |
| { :hostname => 'vmdev', :cpus => 1, :mem => 256, :ip => '172.168.0.101', :box => 'vm_dev', :url => '../precise64.box' }, | |
| { :hostname => 'vmtest', :cpus => 1, :mem => 256, :ip => '172.168.0.102', :box => 'vm_test', :url => '../precise64.box' }, | |
| { :hostname => 'vmprod', :cpus => 1, :mem => 256, :ip => '172.168.0.103', :box => 'vm_prod', :url => '../precise64.box' } | |
| ] | |
| Vagrant.configure('2') do |config| |
This file contains hidden or 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 jason | |
| import org.scalatest.FreeSpec | |
| class OptionLiftSpec extends FreeSpec { | |
| def fTimesTwo(x: Int): Option[Int] = Some(x * 2) | |
| def fTimesThree(x: Int): Option[Int] = Some(x * 3) |
This file contains hidden or 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
| Preparation code | |
| <script> | |
| Benchmark.prototype.setup = function() { | |
| var sum = 0; | |
| var values = [1, 1, 1, 1, 1]; | |
| var i = values.length; | |
| }; | |
| </script> |