1. Install nginx
2. Install minio
3. Install mc client
$ mc mb myminio/static
Bucket created successfully ‘myminio/static’.
/* | |
* ---------------------------------------------------------------------------- | |
* "THE BEER-WARE LICENSE" (Revision 42): | |
* <dweymouth@gmail.com> wrote this file. As long as you retain this notice you | |
* can do whatever you want with this stuff. If we meet some day, and you think | |
* this stuff is worth it, you can buy me a beer in return. D. Weymouth 4/2014 | |
* ---------------------------------------------------------------------------- | |
*/ | |
import java.io.*; |
import org.apache.spark.sql.DataFrame | |
def dataFrameToDDL(dataFrame: DataFrame, tableName: String): String = { | |
val columns = dataFrame.schema.map { field => | |
" " + field.name + " " + field.dataType.simpleString.toUpperCase | |
} | |
s"CREATE TABLE $tableName (\n${columns.mkString(",\n")}\n)" | |
} | |
import spark.sqlContext.implicits._ |
#!/bin/sh | |
# | |
# Resource script for Minio | |
# | |
# Description: Manages Minio as an OCF resource in | |
# an Active-Passive High Availability setup. | |
# | |
# Author: Ricardo Branco <tsmgeek@gmail.com> : Initial script for minio server | |
# License: GNU General Public License (GPL) | |
# |
#!/bin/bash | |
# Install Quake 3: Arena on a mac | |
set -e # exit on error | |
if [ ! -d ${HOME}/ioq3 ]; then | |
(cd ${HOME} && git clone https://github.com/ioquake/ioq3) | |
else | |
(cd ${HOME}/ioq3 && git pull --rebase) |
package main | |
import ( | |
"fmt" | |
"hash/crc32" | |
) | |
func randomServers(token string, count int) []int { | |
hTok := crc32.Checksum([]byte(token), crc32.IEEETable) | |
val := uint32(hTok) |