Skip to content

Instantly share code, notes, and snippets.

View nirenjan's full-sized avatar

nirenjan

  • Silicon Valley, CA, US
View GitHub Profile
@nirenjan
nirenjan / bishop.c
Created January 4, 2013 06:34
Simulate a drunken bishop walk to produce OpenSSL random art.
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#define XLIM 17
#define YLIM 9
#define ARSZ (XLIM * YLIM)
#define DEBUG 0
@nirenjan
nirenjan / dircolortest
Created January 23, 2013 05:08
A utility script to test out dircolors settings without reloading LS_COLORS
#!/usr/bin/perl
# A utility script to test out dircolors settings without reloading
# Usage: dircolortest <dircolors file>
if ($#ARGV < 0) {
die "Usage: $0 <dircolors file>\n";
}
if ($#ARGV > 0) {
warn "Ignoring additional command line arguments\n";
@nirenjan
nirenjan / digital-rain.c
Last active August 29, 2015 14:16
Matrix Digital Rain
/**********************************************************************
* Matrix Digital Rain
*
* Copyright (C) 2015 Nirenjan Krishnan
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies

Keybase proof

I hereby claim:

  • I am nirenjan on github.
  • I am nirenjan (https://keybase.io/nirenjan) on keybase.
  • I have a public key whose fingerprint is A0AE E8F4 253E 54B3 FEC5 304A F6A7 A459 65E6 7802

To claim this, I am signing this object:

@nirenjan
nirenjan / viz.py
Last active December 18, 2021 22:54
Advent of Code - 2021 day 16 - visualization
#!/usr/bin/env -S python3 -u
import sys
import time
from functools import reduce
from io import StringIO
import aocutil
@nirenjan
nirenjan / viz.py
Created December 17, 2021 18:48
Advent of Code - 2021 day 17 - visualization
#!/usr/bin/env python3
import sys
import re
import math
import curses
import time
import aocutil