Skip to content

Instantly share code, notes, and snippets.

View samehkamaleldin's full-sized avatar

Sameh Mohamed samehkamaleldin

View GitHub Profile
@samehkamaleldin
samehkamaleldin / tut.cpp
Created May 1, 2015 18:01
c++11 features by example
#include <iostream>
#include <vector>
#include <map>
#include <string>
#include <memory>
#include <functional>
using namespace std;
// usage of auto as function return type that depends on template params
#include <iostream>
#include <string>
#include <cmath>
#include <cstdlib>
#include <sstream>
using namespace std;
@samehkamaleldin
samehkamaleldin / read_matrix.cpp
Last active August 29, 2015 14:20
Function that reads a matrix from stdin
#include <iostream>
#include <string>
#include <vector>
#include <sstream>
using namespace std;
// -----------------------------------------------------------------------------
// used functions prototype declaration
// -----------------------------------------------------------------------------
NO_COLOR=\033[0m
OK_COLOR=\033[32;01m
ERROR_COLOR=\033[31;01m
WARN_COLOR=\033[33;01m
DEPS = $(go list -f '{{range .TestImports}}{{.}} {{end}}' ./...)
deps:
@echo "$(OK_COLOR)==> Installing dependencies$(NO_COLOR)"
@go get -d -v ./...
@echo $(DEPS) | xargs -n1 go get -d
@samehkamaleldin
samehkamaleldin / js-md-docs-example.js
Created March 12, 2014 09:40
Javascript inline markdown documentation example
/*jslint onevar:true, undef:true, newcap:true, regexp:true, bitwise:true, maxerr:50, indent:4, white:false, nomen:false, plusplus:false */
/*!!
* JS Signals <http://millermedeiros.github.com/js-signals/>
* Released under the MIT license <http://www.opensource.org/licenses/mit-license.php>
* @author Miller Medeiros <http://millermedeiros.com/>
* @version 0.5.3
* @build 154 (02/21/2011 08:27 PM)
*/
@samehkamaleldin
samehkamaleldin / clojure-basic-tutorial.clj
Last active December 15, 2015 11:29
A very basic Clojure tutorial for those who want to get introduced to Clojure. I recommend using Light Table IDE for coding Clojure. [http://www.lighttable.com/ ]
;-----------------------------------------------------------------------------------
; 1 - example of simple operations
;-----------------------------------------------------------------------------------
; arithmatic operations
(+ 1 2)
(* 2 3)
(/ 8 2)
(> 4 3)
(= 4 6)