Software development resources, Linux systems administration, information security and cryptocurrency.
This site is maintained by David Egan:
- GitHub: @csknk
Highlighted Posts
LUKS Encrypt Hard Drive with Cryptsetup on Ubuntu 20.04
01 Dec 2020This article outlines how to LUKS encrypt a secondary drive on Ubuntu 20.04 Focal Fossa using cryptsetup
on the command line.
Pseudo Random Numbers in a Range and Modulo Bias
08 Jun 2020It 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.
Binary Search in Rust
22 Mar 2020Binary 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++.
FizzBuzz in C - without the Modulus Operator
21 Mar 2020Do Fizzbuzz without using the modulus operator. Explores algorithms for computing divisibility by three and divisibility by five. Because...why not?
Bitcoin RPC Through SSH Tunnel
18 Jan 2020Access the bitcoind JSON-RPC server securely across an insecure network by means of SSH tunnelling.
Fast Modular Exponentiation
12 Dec 2019Modular 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.
Compute Bitcoin Merkle Root
01 Sep 2019Merkle trees are an efficient way to verify that an element is in a set, without having to store the full set.
Information Entropy
12 Aug 2019Information Entropy is the average rate at which information is produced by a stochastic(random) source of data.
Lambdas in C++
09 Aug 2019In 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.
Build an Array of Strings From a File in C
29 Jul 2019Use getline()
to read lines from a file, and add them to dynamically allocated memory:
Radix 64 Encoding: Implementation in C
21 Aug 2018Radix 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.
First & Last Element in C++ Iterator Loop
19 Jul 2018When 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.
HTTP Server in C
12 Jun 2018This article describes a simple http server socket in Linux.
List & Dict Comprehensions in Python
27 May 2018Python 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.
Javascript Resources
01 Apr 2018Collection of resources for learning Javascript.