Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@bejado
bejado / .zshrc
Last active January 29, 2018 01:35
# Base 16 terminal
BASE16_SHELL=$HOME/.config/base16-shell/
[ -n "$PS1" ] && [ -s $BASE16_SHELL/profile_helper.sh ] && eval "$($BASE16_SHELL/profile_helper.sh)"
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/Users/benjamin.doherty/.oh-my-zsh
@bejado
bejado / floodfill.m
Last active October 13, 2017 18:15
C interview question for Snap Inc.
#import <Foundation/Foundation.h>
static const int GRID_WIDTH = 10;
static const int GRID_HEIGHT = 10;
void printGrid(bool grid[GRID_WIDTH][GRID_HEIGHT]) {
for (int row = 0; row < GRID_HEIGHT; row++) {
for (int col = 0; col < GRID_WIDTH; col++) {
printf(grid[row][col] ? "x" : ".");
}
;
; A minimal boot sector that prints a 'Hello, world' message
;
; Initialize the stack pointer to the address 0x8000
mov bp, 0x8000
mov sp, bp
; Our boot sector has been loaded into memory at 0x7c00
; Set our es segment register to 0x07c0