Snippets

C#

  • BinaryReaderEx/BinaryWriterEx – Allows you to control whether or not the underlying stream is disposed of after you dispose of the BinaryReader or BinaryWriter object.
  • Managing list files – These are some quick and dirty functions for loading and saving list files.
  • Random Macro Function – This will take an input string with words inside brackets and replace them with a random word from the list.
  • Unix timestamp helper functions – These functions should take care of the base essentials when dealing with Unix Timestamps in C#.
  • Probability function – Generates true or false a given percentage of the time.

PHP

C

  • Simple List – This is a simple string list library I made in C. It shows how to use a struct, a dynamically sized pointer array and some file operations.
  • Configuration Example – This is a crude configuration file reader.