Skip to content

Instantly share code, notes, and snippets.

View Fraganya's full-sized avatar
💡
aspiring to inspire.

Francis Ganya Fraganya

💡
aspiring to inspire.
View GitHub Profile
@liuerfire
liuerfire / dda.cpp
Created December 2, 2012 19:41
generate a line with DDA algorithm
#include <GL/glut.h>
#include <GL/glu.h>
#include <cmath>
void init()
{
glClearColor(0.0, 0.0, 0.0, 0.0);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluOrtho2D(0.0, 500.0, 0.0, 500.0);
@madhums
madhums / producer.js
Created August 30, 2012 13:17
zmq - passing objects to workers
var zmq = require('zmq')
, sock = zmq.socket('push');
sock.bindSync('tcp://127.0.0.1:3000');
console.log('Producer bound to port 3000');
setTimeout(function(){
console.log('sending work');
var data = {
@adhipg
adhipg / countries.sql
Created January 12, 2012 11:41
Sql dump of all the Countries, Country Codes, Phone codes.
CREATE TABLE IF NOT EXISTS `country` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`iso` char(2) NOT NULL,
`name` varchar(80) NOT NULL,
`nicename` varchar(80) NOT NULL,
`iso3` char(3) DEFAULT NULL,
`numcode` smallint(6) DEFAULT NULL,
`phonecode` int(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;