Skip to content

Instantly share code, notes, and snippets.

function can_bono_live(bono) {
var withyou = "with"
var without = "without"
if (!(bono === withyou || bono === without)) {
console.log("bono can live");
}
else {
console.log("bono can't live");
}
}
{
"id": "/cassandra/dcos",
"cmd": "$(pwd)/jre*/bin/java $JAVA_OPTS -classpath cassandra-mesos-framework.jar io.mesosphere.mesos.frameworks.cassandra.framework.Main",
"cpus": 0.5,
"mem": 512,
"disk": 0,
"instances": 1,
"env": {
"CASSANDRA_ZK_TIMEOUT_MS": "10000",
"JAVA_OPTS": "-Xms256m -Xmx256m",
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Resource Statement, Duplicate declaration: File[/usr/local] is already declared in file /etc/puppetlabs/code/environments/production/modules/homebrew/manifests/install.pp:19; cannot redeclare at /opt/puppetlabs/puppet/modules/puppet_enterprise/manifests/symlinks.pp:31 at /opt/puppetlabs/puppet/modules/puppet_enterprise/manifests/symlinks.pp:31:5 on node solutosmacvm11.local
@yaron-idan
yaron-idan / symlinks.pp
Created March 22, 2017 08:39
PE symlinks.pp
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for solutosmacvm11.local
Info: Applying configuration version '1491223177'
Error: Execution of '/usr/local/rvm/bin/rvm install ruby-2.3.1 ' returned 1: Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.12/x86_64/ruby-2.3.1.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
@yaron-idan
yaron-idan / es-compose.yml
Created May 20, 2017 06:12
docker-compoe.yml for 2 node elasticsearch cluster
version: '2'
services:
elasticsearch1:
image: docker.elastic.co/elasticsearch/elasticsearch:5.4.0
cap_add:
- IPC_LOCK
container_name: elasticsearch1
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
class icinga2master {
include 'gcc'
include 'apt'
include 'git'
include 'stdlib'
include 'ruby'
include 'puppi'
include 'perl'
include ::mysql::server
@yaron-idan
yaron-idan / icingaweb2.pp
Created August 8, 2017 10:54
icingaweb2 class
class icinga2test::icingaweb2 {
# Icingaweb configuration
include ::mysql::server
$web_apt_packages = [ 'php7.0', 'libapache2-mod-php7.0' ]
package { $web_apt_packages:
ensure => 'present',
provider => apt,
}
mysql::db { 'icingaweb2':
user => 'icingaweb2',
@yaron-idan
yaron-idan / rpctool
Created September 10, 2017 07:25
rpctool workaround
#!/usr/bin/env bash
"/Library/Application Support/VMware Tools/"vmware-tools-daemon --cmd="$1"
2017-11-26 08:29:02,984 - autoscaler.cluster - INFO - ++++ Running Scaling Loop ++++++
2017-11-26 08:29:03,378 - autoscaler.cluster - INFO - Pods to schedule: 0
2017-11-26 08:29:03,378 - autoscaler.cluster - INFO - ++++ Scaling Up Begins ++++++
2017-11-26 08:29:03,378 - autoscaler.cluster - INFO - Nodes: 4
2017-11-26 08:29:03,379 - autoscaler.cluster - INFO - To schedule: 0
2017-11-26 08:29:03,379 - autoscaler.cluster - INFO - Pending pods: 0
2017-11-26 08:29:03,379 - autoscaler.cluster - INFO - ++++ Scaling Up Ends ++++++
2017-11-26 08:29:03,379 - autoscaler.cluster - INFO - ++++ Maintenance Begins ++++++
2017-11-26 08:29:03,379 - autoscaler.engine_scaler - INFO - ++++ Maintaining Nodes ++++++
2017-11-26 08:29:03,379 - autoscaler.engine_scaler - INFO - node: k8s-devops-81167087-1 state: under-utilized-undrainable