Dev Notes

Software Development Resources by David Egan.

Software development resources, Linux systems administration, information security and cryptocurrency.

This site is maintained by David Egan:


Highlighted Posts

LUKS Encrypt Hard Drive with Cryptsetup on Ubuntu 20.04

01 Dec 2020

This article outlines how to LUKS encrypt a secondary drive on Ubuntu 20.04 Focal Fossa using cryptsetup on the command line.

Read More »

Pseudo Random Numbers in a Range and Modulo Bias

08 Jun 2020

It is sometimes necessary to obtain a pseudo-random number from a specific range. For example, simulating a fair die roll. This can be achieved by using modular arithmetic whereby numbers are limited to a certain range, wrapping around when the range is exceeded. Modulo bias can creep in to this process - this article explains modulo bias and shows how to eliminate it.

Read More »

Binary Search in Rust

22 Mar 2020

Binary search is an algorithmically efficient way of searching an ordered array. This article describes a simple binary search implemented in Rust, contrasted with the same thing in C++.

Read More »

FizzBuzz in C - without the Modulus Operator

21 Mar 2020

Do Fizzbuzz without using the modulus operator. Explores algorithms for computing divisibility by three and divisibility by five. Because...why not?

Read More »

Bitcoin RPC Through SSH Tunnel

18 Jan 2020

Access the bitcoind JSON-RPC server securely across an insecure network by means of SSH tunnelling.

Read More »

Fast Modular Exponentiation

12 Dec 2019

Modular exponentiation is an important part of public key cryptography. Because the numbers involved are typically enormous, an efficient algorithm is essential for any practical applications.

Read More »

Compute Bitcoin Merkle Root

01 Sep 2019

Merkle trees are an efficient way to verify that an element is in a set, without having to store the full set.

Read More »

Information Entropy

12 Aug 2019

Information Entropy is the average rate at which information is produced by a stochastic(random) source of data.

Read More »

Lambdas in C++

09 Aug 2019

In C++ a lambda expression or lambda function is a closure: an unnamed (anonymous) function that is passed inline - usually to another function. Lambda expressions are a concise way of creating simple function objects.

Read More »

Build an Array of Strings From a File in C

29 Jul 2019

Use getline() to read lines from a file, and add them to dynamically allocated memory:

Read More »

Radix 64 Encoding: Implementation in C

21 Aug 2018

Radix 64 or base 64 is a binary-to-text encoding system that is designed to allow binary data to be represented in ASCII string format. This is an educational project accepts a string from a user and Radix 64 encodes it.

Read More »

First & Last Element in C++ Iterator Loop

19 Jul 2018

When looping with an iterator, the index of the current iteration isn't immediately obvious unless you resort to incrementing a counter. Fortunately it's easy to find the start and end of your loop.

Read More »

HTTP Server in C

12 Jun 2018

This article describes a simple http server socket in Linux.

Read More »

List & Dict Comprehensions in Python

27 May 2018

Python comprehensions are syntactic sugar constructs that provide a way to build a list, dictionary or set from a starting list, dictionary or set whilst altering or filtering elements.

Read More »

Javascript Resources

01 Apr 2018

Collection of resources for learning Javascript.

Read More »

Recent Posts


Categories

Posts listing by category