This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Bit operation macros | |
@author Natesh Narain | |
@since July 12 2014 | |
*/ | |
#ifndef BITOPTS | |
#define BITOPTS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Basic OpenGL Shaders | |
out vec3 fragColor; | |
in vec3 wsVertexPosition; | |
in vec3 msFragNormal; | |
uniform mat4 M; | |
uniform mat4 V; | |
uniform mat4 MVP; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
@file rlencoding.cpp | |
@breif Run Length Encode and Decode | |
@author Natesh Narain | |
*/ | |
#include "rlencoding.h" | |
int rlencode(uint8_t *inBuffer, int inLen, uint8_t *outBuffer, int outLen, uint8_t esc) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Generic CmakeList file | |
# | |
# @author Natesh Narain | |
cmake_minimum_required(VERSION 2.8) | |
project(MyProject) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from argparse import ArgumentParser | |
parser = ArgumentParser() | |
parser.add_argument('-S', '--mystring', help='a string') | |
parser.add_argument('-I', '--myint', type=int, help='an integer') | |
parser.add_argument('-R', '--recursive', action='store_true', help='set recursive mode') | |
parser.add_argument('-T', '--something-else', required=True, help='some other switch') | |
args = vars(parser.parse_args()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# | |
# Script for generating new posts for my jekyll base blog | |
# | |
# @author Natesh Narain | |
import os | |
import datetime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Find Arduino Core | |
# | |
# | |
# @author Natesh Narain | |
# @since Feb 03 2016 | |
# Find Arduino version file | |
file(GLOB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set(ASIO_ROOT "asio/include") | |
set(ASIO_VERSION_ROOT "asio-${ASIO_VERSION}/include") | |
find_path(ASIO_INCLUDE_DIR | |
NAMES | |
asio.hpp | |
PATHS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import time | |
import sys | |
width = 50 | |
def displayProgress(progress): | |
bar = int(progress * width) | |
sys.stdout.write("\r[%s%s] %.2f%%" % (("=" * bar), (" " * (width - bar)), progress * 100) ) | |
sys.stdout.flush() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from PIL import Image | |
from argparse import ArgumentParser | |
parser = ArgumentParser() | |
parser.add_argument('-i', '--image', help='image') | |
args = vars(parser.parse_args()) |
OlderNewer