Skip to content

Instantly share code, notes, and snippets.

@hiratz
hiratz / gist:c73b2fa0c6207450172d63a5dbe1db24
Created April 17, 2019 18:27 — forked from andrewrk/gist:1883543
function to count trailing zeros

Given an unsigned integer, return the number of trailing zero bits

Test framework:

#include <stdio.h>
#include <assert.h>

unsigned trailing_zeros(unsigned n) {
    // fill in this function
@hiratz
hiratz / .bash_aliases
Created September 25, 2019 06:40 — forked from vratiu/.bash_aliases
Git shell coloring
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset