Skip to content

Instantly share code, notes, and snippets.

sudo apt-get install --assume-yes python-software-properties
sudo apt-add-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install --assume-yes nodejs
sudo apt-get install --assume-yes git
# Install Graphite
sudo apt-get install python-dev ruby-dev bundler build-essential libpcre3-dev graphite-carbon graphite-web
cat >> /tmp/graphite-carbon << EOF
# Change to true, to enable carbon-cache on boot
package com.symphony.framework.akkastreams.v1;
import akka.stream.Attributes;
import akka.stream.FlowShape;
import akka.stream.Inlet;
import akka.stream.Outlet;
import akka.stream.stage.GraphStage;
import akka.stream.stage.GraphStageLogic;
import akka.stream.stage.InHandler;
import akka.stream.stage.OutHandler;
@mohnishkodnani
mohnishkodnani / compile-time-dsl.scala
Last active February 1, 2023 06:12
Trying to see if we can build such a table at compile time if all values are known.
// If I want to take the code here to build a Table using context functions and convert it to compile time check using macros, to validate rows / cell values etc how do i do that.
// https://docs.scala-lang.org/scala3/reference/contextual/context-functions.html
class Table:
val rows = new ArrayBuffer[Row]
def add(r: Row): Unit = rows += r
override def toString = rows.mkString("Table(", ", ", ")")
class Row:
val cells = new ArrayBuffer[Cell]
def add(c: Cell): Unit = cells += c