Skip to content

Instantly share code, notes, and snippets.

View ohanetz's full-sized avatar
🎩
Why is a raven like a writing-desk?

ohanetz

🎩
Why is a raven like a writing-desk?
View GitHub Profile
from math import ceil
############################
# CONSTANTS - DO NOT ALTER #
############################
DISK_WATERMARK = 0.15
DISK_MARGIN_OF_ERROR = 0.1
HOT_ZONE_MEMORY_DATA_RATIO = 30
WARM_ZONE_MEMORY_DATA_RATIO = 160
@ohanetz
ohanetz / aws-iam-route53-policy.json
Last active June 25, 2020 22:07
Secure access to Kubernetes deployment endpoints on Amazon EKS
{
"Version": "2012–10–17",
"Statement": [
{
"Effect": "Allow",
"Action": "route53:GetChange",
"Resource": "arn:aws:route53:::change/*"
},
{
"Effect": "Allow",
@ohanetz
ohanetz / Dockerfile-jenkins
Last active October 1, 2022 09:03
Utilize Jenkins in an auto-scaling Kubernetes deployment on Amazon EKS
FROM jenkins/jenkins:2.204.5
RUN /usr/local/bin/install-plugins.sh ssh-slaves
RUN /usr/local/bin/install-plugins.sh kubernetes
USER root
RUN apt-get update && apt-get install -y maven
USER jenkins
/
> joola@0.8.14 preinstall /usr/lib/node_modules/joola
> (build/scripts/preinstall.sh || true)
sh: 1: build/scripts/preinstall.sh: not found
> hiredis@0.2.0 install /usr/lib/node_modules/joola/node_modules/hiredis
> node-gyp rebuild
gyp WARN EACCES user "root" does not have permission to access the dev dir "/home/shraga/.node-gyp/0.10.40"
@ohanetz
ohanetz / joola-elastic-schema.json
Created August 25, 2015 12:16
joola table example
{
"_index": "webyclip",
"_type": "jdocument",
"_id": "6753bdfb2a79ff6a630e18be71aa9a40",
"_version": 1,
"_score": 1,
"_source": {
"aggregation_keys": {
"site": "ebay",
"user": "alex"
@ohanetz
ohanetz / install-ffmpeg-ubuntu.sh
Created August 24, 2015 19:26
This script will install ffmpeg with all its dependencies on Ubuntu 14.04 server machine
#!/bin/bash
## Preparing Environment - this can be altered to match your installation ##
# Folder to store ffmpeg and dependency libraries sources in the process:
FFMPEG_SRC=~/ffmpeg
# Folder to install ffmpeg binary into:
FFMPEG_BIN=$HOME/bin
## Install dependencies and packages that can be installed by apt-get ##
sudo apt-get update
ohanetz@ubuntu-server:~$ npm install joola
\
> joola@0.8.12 preinstall /home/ohanetz/node_modules/joola
> (build/scripts/preinstall.sh || true)
sh: 1: build/scripts/preinstall.sh: not found
> hiredis@0.2.0 install /home/ohanetz/node_modules/joola/node_modules/hiredis
> node-gyp rebuild
ohanetz@ubuntu-server:~$ sudo joola
11:34:55.400Z INFO joola: Found geoip-lite module.
WARNING: No configurations found in configuration directory:
WARNING: /home/ohanetz/config
WARNING: See https://www.npmjs.org/package/config for more information.
ERROR! Object.keys called on non-object
TypeError: Object.keys called on non-object
at Function.keys (native)
at Object.datastore.init (/usr/lib/node_modules/joola/lib/common/datastore.js:30:10)
at /usr/lib/node_modules/joola/lib/joola.js:104:23
ohanetz@ubuntu-server:~$ npm -v
1.4.28
ohanetz@ubuntu-server:~$ sudo npm install -g joola
\
> joola@0.8.11 preinstall /usr/lib/node_modules/joola
> build/scripts/preinstall.sh || true
sh: 1: build/scripts/preinstall.sh: not found
npm ERR! Error: version not found: joola.sdk@0.8.7-develop
npm ERR! at /usr/lib/node_modules/npm/lib/cache/add-named.js:125:12