Just to get everyone up to speed; Structs are a great because they provide compile time checks. Compile-time checks are awesome as we can catch errors before we run our application in the run-time. Structs also allow us to make custom data types, and we can implement protocols that amongst other things allow us to tell Elixir how it should enumerate over our data type, or insert items into our data type using Protocols.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> {} }: | |
pkgs.mkShell { | |
buildInputs = [ | |
pkgs.hello | |
]; | |
shellHook = '' | |
echo env1 | |
''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with import <nixpkgs> {}; | |
stdenv.mkDerivation rec { | |
name = "cloudi-${version}"; | |
version = "1.7.5"; | |
src = fetchzip { | |
url = "https://osdn.net/dl/cloudi/${name}.tar.gz"; | |
sha256 = "0aj0rwzfyad99gnm27km705ba46nsdy1ww87qgk3cfpi0017wx86"; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Installs NixOS on an OVH server, wiping the server. | |
# | |
# This is for a specific server configuration; adjust where needed. | |
# Originally written for an OVH STOR-1 server. | |
# | |
# Prerequisites: | |
# * Create a LUKS key file at /root/benacofs-luks-key | |
# e.g. by copying it up. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# -- sane bash errors -- # | |
set -Eeuo pipefail | |
# -- docker exec -- # | |
cat > Dockerfile <<EOF | |
FROM nixos/nix | |
RUN nix-channel --add https://github.com/Holo-Host/nixpkgs-channels/archive/680f9d7ea90dd0b48b51f29899c3110196b0e913.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ nixpkgs ? import <nixpkgs> {} | |
, version ? "0.1" | |
, proxy ? "http://10.183.23.58:3128" | |
}: | |
with nixpkgs; | |
let | |
elixir = beam.packages.erlangR21.elixir_1_7; | |
nodejs = nodejs-10_x; |
Visualising data helps in building a much deeper understanding of the data and fastens analytics around the data. There are several mature paid products available in the market. Recently, I explored an open-source product name Apache-Superset which I found a very upbeat product in this space. Some prominent features of Superset are:
- A rich set of data visualisations
- An easy-to-use interface for exploring and visualising data
- Create and share dashboards
After reading about Superset, I wanted to try it, and as Superset is a python
programming language based project, we can easily install it using pip
, but I decided to set it up as a container based on Docker. Apache-Superset GitHub Repo contains code for building and running Superset as a container. Since I wan
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns app.jdbc.helpers | |
(:require [jdbc.core :as jdbc] | |
[jdbc.proto :as jdbc-proto] | |
[honeysql.core :as sql] | |
; Load extensions | |
[honeysql-postgres.format])) | |
(defn -upsert-sql | |
[table keys pk] |
Getting Started With Superset: Airbnb’s data exploration platform
These instructions are for Amazon Linux Version 2
sudo yum update -y
sudo yum install python3 -y