Skip to content

Instantly share code, notes, and snippets.


Ibraheem Alhashim ialhashim

View GitHub Profile
ialhashim /
Last active Dec 20, 2015
GUI preparation - Ubuntu @ Amazon EC2
# Update software packages
sudo apt-get update
# Install LXDE desktop
sudo apt-get -y install lxde
# Start desktop service
sudo start lxdm
# Install Remote Desktop
ialhashim /
Last active Dec 20, 2015
Development preparation - Ubuntu @ Amazon EC2
# Update software packages
sudo apt-get update
# Download packages: git + gcc
sudo apt-get -y install git g++ make cmake
# Download common packages: jpeg + zlib + python-pip
sudo apt-get -y install libjpeg8-dev libpng-dev zlib1g-dev python-pip
# Download software: ImageMagick
ialhashim /
Last active Dec 20, 2015
Get bundler package.
# Clone repos
git clone
git clone
# Compile bundler
cd EventCloudBundler/bundler
make clean
sudo cp bin/ /lib
cd ../..
ialhashim / gist:8001562
Created Dec 17, 2013 upload API using Qt
View gist:8001562
#pragma once
#include <QNetworkAccessManager>
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QHttpMultiPart>
#include <QHttpPart>
#include <QFile>
namespace BoxCloud
ialhashim / SoftwareRenderer
Created Dec 17, 2013
3D software rendering of points and lines.
View SoftwareRenderer
#pragma once
#include <iostream> // std::cout
#include <QImage>
#include <QPainter>
#include <QPoint>
#include <Eigen/Core>
#include <Eigen/Geometry>
#define RADIANS(deg) ((deg)/180.0 * M_PI)
ialhashim / bluenoise.h
Last active Aug 29, 2015
N-dimensional blue-noise sampling
View bluenoise.h
// From Robert Bridson's curlnoise
// Example usage:
// std::vector<Vector3> samples;
// bluenoise_sample<3, double, Vector3>(0.02, Vector3(-0.5,-0.5,-0.5), Vector3(0.5,0.5,0.5), samples );
#include <array>
View principal_curvature.cpp
// Code from igl library
// Copyright (C) 2013 Alec Jacobson <>
// This Source Code Form is subject to the terms of the Mozilla Public License
// v. 2.0. If a copy of the MPL was not distributed with this file, You can
// obtain one at
#pragma once
#include <Eigen/Geometry>
#include <Eigen/Dense>
View umeyama_usage.cpp
//Eigen::MatrixXd src = pointsToMatrix(pointsA[i]);
//Eigen::MatrixXd dst = pointsToMatrix(pointsB[j]);
//Eigen::Matrix4d cR_t = Eigen::umeyama(src, dst, true);
//Eigen::Matrix4d R_t = Eigen::umeyama(src, dst, false);
//Eigen::Matrix3d R = R_t.block(0,0,3,3);
//Eigen::Vector3d t = R_t.block(0,3,3,1);
View download_warehouse.txt
Expression: (id=\d)(.+?)(")
Python script to download:
import os.path
ialhashim / Cylinder.cpp
Created Apr 24, 2014
A Capped 3D Cylinder geoemtry in C++
View Cylinder.cpp
std::vector<Vector3> spine, spineNormals;
for(int i = 0; i < 10 ; i++){
spine.push_back( Vector3(0,0,0.1 * i) );
#define DEG2RAD 0.01745329
double theta = DEG2RAD * double(i) * M_PI * 2;
spineNormals.push_back(rotatedVec(Vector3(0,0.01,0),theta, Vector3(0,0,1)));
// Generate capped cylinder
int numSides = 20, numCaps = numSides * 0.5;