Doing Statistics in awk

Statistics in awk

One exercise that offers a lot of interesting challenges in coding is to use a programming language for an application that it's not intended to be used for. Writing a Fortran compiler in TECO and solving the Towers of Hanoi problem in the troff text formatter are two examples from the legendary Hacker Purity Test. … Continue reading Doing Statistics in awk

Shell Script for Launching a Local Denial-of-Service Attack

Shell script to launch a local denial-of-service attack

Disclaimer: The following article is written for entertainment and educational purposes only. Neither the script shown here nor any of the techniques involved are intended to be used in real life. Launching denial-of-service attacks is illegal and can get you in serious trouble. I do not condone or support any use of such hacking methods … Continue reading Shell Script for Launching a Local Denial-of-Service Attack

Obfuscated Unix Scripting with sed

Okay, so I had something else planned for this Friday night, but the project I'm working on that I wanted to share is taking a lot longer than expected, so I'm having to push the publication date back a few days while I get all the code working and create all the visuals in SVG. … Continue reading Obfuscated Unix Scripting with sed

Unix vs. Windows: How to Check and Convert Between the Two File Formats

Different operating systems use different formats for line breaks, and this can cause confusion and difficulty for a lot of newbies. In this article I will explain the difference between the Unix file format used by Linux and MacOS and the DOS format used by Windows, and I will also show you how to check … Continue reading Unix vs. Windows: How to Check and Convert Between the Two File Formats

Convert a TeX File Directly to PDF Format (Cygwin)

This post is a note to myself, in the fashion of another blogger on here that I follow. I think it's prudent because I just had to jump through a bunch of hoops to solve the titular problem, only to find that there was a much simpler method. Basically, I didn't know how to convert … Continue reading Convert a TeX File Directly to PDF Format (Cygwin)

How to Generate Truly Random Numbers in POSIX Systems

Everyone knows about the rand() and srand() functions in the C Standard Library (or any of the equivalents in other programming languages). These functions work together to generate pseudo-random numbers from a seed, thus lending some nondeterminism to the program. But what about truly random numbers? What if you want a stream of random data … Continue reading How to Generate Truly Random Numbers in POSIX Systems

Scheduling Jobs in Linux with crontab

Well, it looks like cron/crontab administration is trending in the Linux community on WordPress for some reason, and just my luck, because I happen to be a crontab veteran, having played with this program extensively back in 2010 when I was first learning Unix. It would be foolish, then, for me to not exploit this … Continue reading Scheduling Jobs in Linux with crontab

Custom Syntax Highlighting for Vim

Hey everybody, it's your favorite tech-savvy psychopath with another informative tutorial for you to enjoy. This time I'm going to show you the system I use for adding my own custom syntax highlighting to Vim, using the scripting language informally known as Vimscript. I say "the system I use" rather than "how to do XYZ" … Continue reading Custom Syntax Highlighting for Vim

Marketable Skills (Random X11 Post)

It's weird. I've known how to code for more than half my life - about 15 years now, yet I haven't gotten to the point where my skills are actually marketable. I've learned a hell of a lot of theory - how to design algorithms, how to analyze and optimize them, and also a lot … Continue reading Marketable Skills (Random X11 Post)

How to Generate UUIDs in Linux

UUIDs (or GUIDs as they're called in Windows parlance) are 128-bit codes that are used as unique identifiers for objects and resources. The acronym stands for Universally Unique IDentifier (or Globally Unique IDentifier in Windows). The purpose of UUIDs is to provide a system of identification where there is some assurance that the ID you're … Continue reading How to Generate UUIDs in Linux