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
infix fun <A, B, C> ((A) -> B).andThen(g: (B) -> C): (A) -> C = { a: A -> g(this(a)) } | |
val c = a andThen b |
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
# Install homebrew, if is not already installed: | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# Update and upgrade homebrew, if needed: | |
brew update && brew upgrade | |
# Install XCode (it is a long download, it is an Octave dependency) | |
# Go to Apple Store and install. | |
# Install Aquaterm |
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
val kotlinKeywordsAndSymbols = | |
mutableListOf( | |
"as", | |
"as?", | |
"break", | |
"class", | |
"continue", | |
"do", | |
"else", | |
"false", |
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 | |
#echo $@ | |
# store arguments in a special array | |
args=("$@") | |
# get number of elements | |
ELEMENTS=${#args[@]} | |
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
@file:MavenRepository("mathemagika", "https://dl.bintray.com/danilo-araujo-silva/mathemagika" ) | |
@file:DependsOnMaven("com.daniloaraujosilva:mathemagika:1.0.0") | |
println(zeta(2)) |
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
/// https://css-tricks.com/snippets/sass/deep-getset-maps/ | |
/// Map deep get | |
/// @author Hugo Giraudel | |
/// @access public | |
/// @param {Map} $map - Map | |
/// @param {Arglist} $keys - Key chain | |
/// @return {*} - Desired value | |
@function map-deep-get($map, $keys...) { | |
@each $key in $keys { | |
$map: map-get($map, $key); |
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
# Usage: | |
# useradd -r bitcoind | |
# docker builx build --no-cache -t bitcoind --platform linux/amd64 --build-arg USER_ID=$( id -u bitcoind ) --build-arg GROUP_ID=$( id -g bitcoind ) . | |
# docker run -dt --name=bitcoind bitcoind -v /path/to/bitcoin/volume/folder:/media/bitcoin | |
# | |
FROM ubuntu:latest | |
RUN apt update \ | |
&& apt install -y --no-install-recommends \ |
01- Create two different docker containers (there are bitcoin.conf examples below) bitcoind-regtest-01
and bitcoind-regtest-02
pointing to different data folders (The regtest network will only work with at least 2 nodes).
bitcoind -conf=/path/to/bitcoind-regtest-01/bitcoin.conf -datadir=/path/to/bitcoind-regtest-01/data/folder -daemon
bitcoind -conf=/path/to/bitcoind-regtest-02/bitcoin.conf -datadir=/path/to/bitcoind-regtest-02/data/folder -daemon
02- Create a docker network with the 2 containers
docker network create bitcoind-regtest-network
docker network connect bitcoind-regtest-network bitcoind-regtest-01
docker network connect bitcoind-regtest-network bitcoind-regtest-02
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
/// https://css-tricks.com/snippets/sass/deep-getset-maps/ | |
/// Deep set function to set a value in nested maps | |
/// @author Hugo Giraudel | |
/// @access public | |
/// @param {Map} $map - Map | |
/// @param {List} $keys - Key chaine | |
/// @param {*} $value - Value to assign | |
/// @return {Map} | |
@function map-deep-set($map, $keys, $value) { | |
$maps: ($map,); |