View bonus.sol
uint saleTime = period * 1 days;
if(now < start + saleTime.div(4)) {
bonusTokens = tokens.div(4);
} else if(now >= start + saleTime.div(4) && now < start + saleTime.div(2)) {
bonusTokens = tokens.div(10);
} else if(now >= start + saleTime.div(2) && now > saleTime.div(4).mul(3)) {
bonusTokens = tokens.div(20);

How to get on Rinkeby Testnet in less than 10 minutes

Following instructions from the excellent

Synchronizing a Full Node

A full node lets you access all state. There is a light node (state-on-demand) and wallet-only (no state) instructions as well,

View benchmark.ex
iex> So.Exclude.exclude1
Name ips average deviation median
substract 9.18 M 0.109 μs ±358.78% 0.100 μs
mapset_difference 4.00 M 0.25 μs ±17781.86% 0.0 μs
enum_filter 3.70 M 0.27 μs ±1712.25% 0.20 μs
ordsets 2.63 M 0.38 μs ±1348.35% 0.30 μs
substract 9.18 M
mapset_difference 4.00 M - 2.30x slower
View new.ex
defmodule New do
def sum(a, b) do
a + b
# Called by "git push" after it has checked the remote status,
# but before anything has been pushed.
# If this script exits with a non-zero status nothing will be pushed.
# Steps to install, from the root directory of your repo...
# 1. Copy the file into your repo at `.git/hooks/pre-push`
# 2. Set executable permissions, run `chmod +x .git/hooks/pre-push`


misc:location various data regarding location, organisation, etc.

View nginx.conf
#user nobody;
#Defines which Linux system user will own and run the Nginx server
worker_processes 1;
#Referes to single threaded process. Generally set to be equal to the number of CPUs or cores.
#error_log logs/error.log; #error_log logs/error.log notice;
#Specifies the file where server logs.
View exercises.go
// exercise-maps
package main
import (
View four_in_one_demo.ino
//There id more information aboat this code in Page 26 of "Instruction manual-English.pdf"
// This code is for the bluetooth and infrared controlled ultrasonic arduino car.
// By default, the buttons 2, 4, 6 en 8 of the remote will move the car in infrared mode.
// Ultrasonic mode is enabled by the play/pause button.
// Track following is enabled by the EQ button.
// Button 5 will stop whatever the car is doing and enable button 2, 4, 6 en 8 again.
// Bluetooth is always enabled and available while in infrared mode. The password is 1234.
// Android car control app can be found here: