Skip to content

Instantly share code, notes, and snippets.

View mhtocs's full-sized avatar
🌱
learning

Arvind M. mhtocs

🌱
learning
  • Zoho
  • Chennai
View GitHub Profile
#!/bin/bash
iatest=$(expr index "$-" i)
#######################################################
# SOURCED ALIAS'S AND SCRIPTS BY zachbrowne.me
#######################################################
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
@mhtocs
mhtocs / base.gl.cpp
Created April 21, 2018 20:35 — forked from kopiro/base.gl.cpp
OpenGL base C++ project
#include <iostream>
#include <cmath>
#include <GL/glut.h>
#include <GL/glu.h>
#include <GL/gl.h>
void renderScene() // this function is called when you need to redraw the scene
{
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); // clear the scene
@mhtocs
mhtocs / 0_reuse_code.js
Created February 26, 2017 04:29
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@mhtocs
mhtocs / buglife.cc
Created February 25, 2017 05:07 — forked from zsrinivas/buglife.cc
spoj 3377. A Bug’s Life | BUGLIFE
#include <bits/stdc++.h>
using namespace std;
#define usingcincout ios::sync_with_stdio(0);cin.tie(0);
template <class T>
void gint(T& n) {
n = 0;
int sign=1;
register char c=0;
while(c<33)
@mhtocs
mhtocs / io.cpp
Created February 25, 2017 04:48
Fast I/O in C/C++
/*
grab the whole line
char a[100];
cin.getline(a,100);
scanf("%[^\n]",a);
gets(a);
*/
inline void fastRead_int(int *a)
{