Skip to content

Instantly share code, notes, and snippets.

View dsquier's full-sized avatar

dsquier dsquier

View GitHub Profile
@yoavniran
yoavniran / ultimate-ut-cheat-sheet.md
Last active July 12, 2024 11:15
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
@DanielaSfregola
DanielaSfregola / MyConfig.scala
Last active March 20, 2022 18:33
A simple script that will try to load configurations in the following order: 1) From properly named environment variables 2) From command line paramenters 3) From the configuration file. See article http://danielasfregola.com/2015/06/01/loading-configurations-in-scala/
import com.typesafe.config.ConfigFactory
import scala.util.Properties
class MyConfig(fileNameOption: Option[String] = None) {
val config = fileNameOption.fold(
ifEmpty = ConfigFactory.load() )(
file => ConfigFactory.load(file) )
def envOrElseConfig(name: String): String = {
@SinanGabel
SinanGabel / Cluster setup hints
Last active June 25, 2024 09:38
CouchDB 2.* on Ubuntu 16.04
# See also: http://docs.couchdb.org/en/latest/cluster/index.html
# Before you can add nodes to form a cluster, you have to have them listen on a public ip address
# and set up an admin user (use same admin:password for all nodes).
# Do this, once per node:
# If you have installed couchdb in /opt (else change the Path)
cd /opt/couchdb/etc
cp local.ini local.ini.orig
cp vm.args vm.args.orig
anonymous
anonymous / instructions.md
Created September 25, 2017 22:53
Trying out wohali's couchdb netdata plugin

Installing

  1. Install couchdb per http://docs.couchdb.org/en/2.1.0/install/unix.html#installation-using-the-apache-couchdb-convenience-binary-packages
  2. $ sudo apt-get install zlib1g-dev uuid-dev libmnl-dev gcc make git autoconf autoconf-archive autogen automake pkg-config curl
  3. $ cd ~ && git clone https://github.com/wohali/netdata
  4. $ cd netdata && git checkout couchdb
  5. $ sudo ./netdata-installer.sh
  6. $ sudo vi /etc/netdata/python.d/couchdb.conf and set admin username/password
  7. $ sudo service netdata restart
  8. Browse to http://localhost:19999/