Skip to content

Instantly share code, notes, and snippets.

View basus's full-sized avatar

Shrutarshi Basu basus

View GitHub Profile
@basus
basus / fizzbuzz.ml
Created April 30, 2013 23:53
Variations of Fizzbuzz in OCaml, translated from the Rust version in "FizzBuzz Revisited" by Lindsey Kuper: http://composition.al/blog/2013/03/02/fizzbuzz-revisited/
(* Variations of Fizzbuzz in OCaml, translated from the Rust version in
"FizzBuzz Revisited" by Lindsey Kuper:
http://composition.al/blog/2013/03/02/fizzbuzz-revisited/ *)
(* The FizzBuzz test proposed by Imran Ghory:
http://imranontech.com/2007/01/24/using-fizzbuzz-to-find-developers-who-grok-coding/ *)
(* and made famous by Jeff Atwood:
http://www.codinghorror.com/blog/2007/02/why-cant-programmers-program.html *)
@basus
basus / result.html
Created January 6, 2012 03:10
Org2blog broken shortcode export
I've been a sworn fan of version cont
[sourcecode language="text" light="true"]
function gitify {
status=$(git status 2>/dev/null | tail -n 1)
if [[ $status == "" ]]
then
echo ""
else
echo $(git-
@basus
basus / about.md
Created November 17, 2011 03:31 — forked from blaix/about.md
Programming Achievements: How to Level Up as a Developer

Programming Achievements: How to Level Up as a Developer

  1. Select a particular experience to pursue.
  2. Pursue that experience to completion. (Achievement unlocked!)
  3. Reflect on that experience. Really soak it in. Maybe a blog post would be in order?
  4. Return to Step 1, this time selecting a new experience.

This gist is a fork of this other gist which is itself a fork of a gist from this blog post.

@basus
basus / bitfield.c
Created July 26, 2011 22:12
Bitfields in C
/* Some simple demonstration code to show the use of bit fields in C */
#include <stdio.h>
typedef struct {
unsigned int s0 : 1;
unsigned int s1 : 1;
unsigned int s2 : 1;
unsigned int s3 : 1;
unsigned int s4 : 1;
@basus
basus / jruby-git PKGBUILD
Created February 19, 2011 04:05
PKGBUILD file for building JRuby from Git on Arch Linux
# $Id$
# Maintainer: Shrutarshi Basu <me@basushr.net>
# Contributor: Shrutarshi Basu <me@basushr.net>
pkgname=jruby-git
pkgver=20110218
pkgrel=1
pkgdesc="JRuby is an 100% pure-Java implementation of the Ruby programming language."
url="http://jruby.org/"
license=('CPL' 'GPL' 'LGPL')