A function for finding the modular multiplicative inverse, based on an extended version of the Euclidean algorithm.
Round Floating Point Numbers
Custom floating point rounding based on three functions that allow you to round to a certain precision, round up and round down.
Convert Pixels To Centimeters
A Ruby function that can be easily adapted to work with any language, because it uses a simple division and multiplication to calculate the number of centimeters in the given pixel size.
Format Number As Currency
Add the commas that separate digits in large numbers using this FormatCurrency function for Ruby.
Forcing downloads with PHP
The DownloadFile() function will initiate a download from the path that you provided. It works great with large files because it buffers the data, instead of putting the entire content of the file in memory and serving it from there.
Write A PDF File Using Ruby
Using the open source PDF::Writer library for Ruby to create PDF documents on the fly and save them on the server.
Array Of United States Area Codes
An array of 3-digit telephone area codes and the US states that they correspond to.
Generate random password of various strength
This function is a smart password generator, as it allows you to define the length and strength of the password. It also avoids characters that can easily be confused with digits such as lowercase ‘l’ and ‘o’.
A function that formats date and time
The ConvertDateTime() function takes a date and time string in the typical MySQL format (YYYY-MM-DD HH:MM:SS) and formats it as instructed by the formatting string.
Random Password Using PHP
A function that generates strong passwords by mixing uppercase and lowercase characters with numbers.