# IP Address of master machine
masterip=192.168.0.101
# IP Address of node machine
nodeip=192.168.0.14
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
| function helloWorld() | |
| print("Hello World") | |
| end | |
| helloWorld() |
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
| import java.io.{File, RandomAccessFile} | |
| class HashSetFile(file: File, modulus: Int = 32) { | |
| val raf = new RandomAccessFile(file, "rw") | |
| def filePosition = raf.getFilePointer | |
| def fileLength = raf.length | |
| val bytesInLong = java.lang.Long.BYTES | |
| val indexesStart = bytesInLong | |
| val start = System.currentTimeMillis() | |
| if (fileLength == 0) { |
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
| import java.io.{File, RandomAccessFile} | |
| class RandomAccessFileHashSet(file: File) { | |
| val raf = new RandomAccessFile(file, "rw") | |
| def filePosition = raf.getFilePointer | |
| def fileLength = raf.length | |
| var recordCount: Long = 0L | |
| raf.writeLong(recordCount) | |
| val hashStart = filePosition |
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
| export BLACK='\033[0;30m' # Black - Regular | |
| export RED='\033[0;31m' # Red | |
| export GREEN='\033[0;32m' # Green | |
| export YELLOW='\033[0;33m' # Yellow | |
| export BLUE='\033[0;34m' # Blue | |
| export MAGENTA='\033[0;35m' # Purple | |
| export CYAN='\033[0;36m' # Cyan | |
| export WHITE='\033[0;37m' # White | |
| export BLACK_BOLD='\033[1;30m' # Black - Regular |
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
| import java.io.File | |
| import play.api.ApplicationLoader.Context | |
| import play.api._ | |
| import play.api.routing.Router | |
| import play.core.server.{ServerConfig, NettyServer} | |
| abstract class LocalWebServer { | |
| val environment = new Environment( | |
| new File("."), |
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
| echo -e "\E[1m\E[48;5;255m\E[38;5;255m\u2585\E[1m\E[48;5;255m\E[38;5;255m\u2585\E[1m\E[48;5;255m\E[38;5;255m\u2585\E[1m\E[48;5;255m\E[38;5;255m\u2585\E[1m\E[48;5;255m\E[38;5;255m\u2585\E[1m\E[48;5;255m\E[38;5;255m\u2585\E[1m\E[48;5;255m\E[38;5;231m\u2585\E[1m\E[48;5;255m\E[38;5;231m\u2585\E[1m\E[48;5;231m\E[38;5;231m\u2585\E[1m\E[48;5;231m\E[38;5;231m\u2585\E[1m\E[48;5;231m\E[38;5;231m\u2585\E[1m\E[48;5;231m\E[38;5;231m\u2585\E[1m\E[48;5;231m\E[38;5;231m\u2585\E[1m\E[48;5;231m\E[38;5;231m\u2585\E[1m\E[48;5;231m\E[38;5;188m\u2585\E[1m\E[48;5;231m\E[38;5;231m\u2585\E[1m\E[48;5;231m\E[38;5;231m\u2585\E[1m\E[48;5;231m\E[38;5;231m\u2585\E[1m\E[48;5;231m\E[38;5;188m\u2585\E[1m\E[48;5;231m\E[38;5;195m\u2585\E[1m\E[48;5;231m\E[38;5;231m\u2585\E[1m\E[48;5;188m\E[38;5;145m\u2585\E[1m\E[48;5;145m\E[38;5;102m\u2585\E[1m\E[48;5;102m\E[38;5;102m\u2585\E[1m\E[48;5;102m\E[38;5;138m\u2585\E[1m\E[48;5;102m\E[38;5;138m\u2585\E[1m\E[48;5;138m\E[38;5;145m\u2585\E[1m\E[48;5;102m\E[38;5;145m\u2585\E[1m\E[48;5;102m\E[38;5;102m\u2585 |
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
| # Pre-requisits | |
| ## for mkisofs | |
| brew install dvdrtools | |
| ## fix brew | |
| cd /usr/local/Library/ | |
| sudo git pull origin master | |
| ## gpg |
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
| Deploy manager: | |
| curl -sSL http://test.shipyard-project.com/deploy | bash -s | |
| Deploy nodes: | |
| curl -sSL http://test.shipyard-project.com/deploy | ACTION=node DISCOVERY=etcd://<IP-OF-SHIPYARD>:4001 bash -s |
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
| function cycle(array) { | |
| function cycleInt(array, count) { | |
| if (count == array.length) return []; | |
| var tmp = array.slice(0); | |
| tmp.push(tmp.shift()); | |
| return cycleInt(tmp, count + 1).concat([tmp]); | |
| } | |
| return cycleInt(array, 0); | |
| } | |
| function flatten(col) { |