Skip to content

Instantly share code, notes, and snippets.

View naxels's full-sized avatar

Patrick van de Glind naxels

View GitHub Profile
@naxels
naxels / example_json_decode_req.exs
Created February 26, 2024 08:54
Elixir Req Jason decode options
#!/usr/bin/env -S ERL_FLAGS=+B elixir
Mix.install([{:req, "~> 0.4.0"}])
# the normal Req request which decodes to String
resp = Req.get!("https://dummyjson.com/products/1").body
IO.puts(resp["title"])
IO.puts(resp["description"])
# supplying the decode keyword list options:
@naxels
naxels / haproxy-setup.sh
Created January 5, 2021 16:04
HAProxy 2.3 setup CentOS 7
# assumes you have vim and wget installed
sudo su
cd ~
yum install gcc pcre-devel tar make openssl-devel systemd-devel -y
wget https://www.haproxy.org/download/2.3/src/haproxy-2.3.2.tar.gz -O ~/haproxy.tar.gz
tar xzvf ~/haproxy.tar.gz -C ~/
@naxels
naxels / 0 pre-setup.sh
Last active September 8, 2019 09:11
Mac - Clojure Denodo JDBC driver setup with Maven
# Download Denodo JDBC driver from https://community.denodo.com/drivers/jdbc/32
# set JDBC_HOME:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.(latest).jdk/Contents/Home
# Download maven from https://maven.apache.org/install.html
# unzip/untar and ls to the /bin folder & execute:
# this will install/create the Denodo driver for the self-created version number based on the jar filename.