Skip to content

Instantly share code, notes, and snippets.

View neuralvis's full-sized avatar

Madhu Srinivasan neuralvis

View GitHub Profile
@neuralvis
neuralvis / gist:e3a5b258d59bea48d367335a556e000c
Created October 9, 2019 16:30
Removing a git submodule
> git submodule deinit <path_to_submodule>
> git rm <path_to_submodule>
> git commit-m "Removed submodule "
> rm -rf .git/modules/<path_to_submodule>
@neuralvis
neuralvis / cool-game-programming-blogs.opml
Created January 28, 2018 06:25 — forked from Reedbeta/cool-game-programming-blogs.opml
List of cool blogs on game programming, graphics, theoretical physics, and other random stuff
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Graphics, Games, Programming, and Physics Blogs</title>
</head>
<body>
<outline text="Tech News" title="Tech News">
<outline type="rss" text="Ars Technica" title="Ars Technica" xmlUrl="http://feeds.arstechnica.com/arstechnica/index/" htmlUrl="https://arstechnica.com"/>
<outline type="rss" text="Polygon - Full" title="Polygon - Full" xmlUrl="http://www.polygon.com/rss/index.xml" htmlUrl="https://www.polygon.com/"/>
<outline type="rss" text="Road to VR" title="Road to VR" xmlUrl="http://www.roadtovr.com/feed" htmlUrl="https://www.roadtovr.com"/>
@neuralvis
neuralvis / center_geo.py
Created April 25, 2017 12:11 — forked from amites/center_geo.py
Center Geolocations
from math import cos, sin, atan2, sqrt
def center_geolocation(geolocations):
"""
Provide a relatively accurate center lat, lon returned as a list pair, given
a list of list pairs.
ex: in: geolocations = ((lat1,lon1), (lat2,lon2),)
out: (center_lat, center_lon)
"""
x = 0
cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.11 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/home/srinivm/OSX/software/gpuarray/0.2/ ../
@neuralvis
neuralvis / git.migrate
Created January 25, 2016 07:33 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
/*
* drivertest.cpp
* Vector addition (host code)
*
* Andrei de A. Formiga, 2012-06-04
*/
#include <stdio.h>
#include <stdlib.h>
@neuralvis
neuralvis / 0_reuse_code.js
Created May 31, 2014 18:09
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
static N:int = 100000;
//
// Chinese Whispers in Rust
// Based on example by Rob Pike
// in http://www.youtube.com/watch?v=f6kdp27TYZs
//
fn main() {
let (leftmost_port, leftmost_chan) = Chan::new();
let mut leftc: Chan<int> = leftmost_chan;
@neuralvis
neuralvis / pool.rs
Created December 31, 2013 11:52 — forked from anonymous/pool.rs
#[no_uv];
extern mod native;
extern mod green;
extern mod rustuv; // pull in I/O support for libgreen
use std::task::TaskOpts;
#[start]
fn start(argc: int, argv: **u8) -> int {
do native::start(argc, argv) {
@neuralvis
neuralvis / green.rs
Created December 31, 2013 11:52 — forked from anonymous/green.rs
#[no_uv];
extern mod green;
extern mod rustuv; // pull in I/O support
#[start]
fn start(argc: int, argv: **u8) -> int {
do green::start(argc, argv) {
main();
}
}