Skip to content

Instantly share code, notes, and snippets.


Ravern Koh ravernkoh

Block or report user

Report or block ravernkoh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View .tigrc
bind main P !git push origin %(branch)
function cdx
if count $argv > /dev/null
set proj $argv[1]
echo "Error: destination not provided."
return 1
set dest (jq -r ".[\"$proj\"]" ~/.config/cdx/config.json)
if [ $dest != "null" ]
ravernkoh / simple_expression_evaluator.c
Last active Nov 7, 2018
View simple_expression_evaluator.c
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef int bool;
#define TRUE 1
#define FALSE 0
#define MAX_STACK_LEN 20
# Grammar
# program -> expression
# expression -> operation
# operation -> atom {binary_operator atom}
# atom -> literal
# atom -> LEFT_PAREN expression RIGHT_PAREN
ravernkoh /
Created Aug 10, 2018
Matrix Rotation Challenge
# Given an image represented by an NxN matrix, where each pixel in the image is
# 4 bytes, write a method to rotate the image by 90 degrees. Can you do this in
# place?
# Displays the given matrix.
def display(matrix):
N = len(matrix)
for column in range(0, N):
for row in range(0, N):
You can’t perform that action at this time.