Skip to content

Instantly share code, notes, and snippets.

Mohammad Nasirifar farnasirim

Block or report user

Report or block farnasirim

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
farnasirim / ternary_on_integer_domain.cpp
Created Aug 21, 2018
Ternary search on integer domain + test drive
View ternary_on_integer_domain.cpp
#include <cmath>
#include <algorithm>
#include <vector>
#include <iostream>
#include <cassert>
using namespace std;
template <typename Compare>
int findMax(int from, int to, Compare lessFunctor) { // from and to are inclusive: [from, to]
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="stylesheet" href="">
<script src="" charset="utf-8"></script>
<style>.cmx-user-scene4 .cmx-text-border .cmx-path {stroke: orange}</style>
<div style="max-width:800px; -webkit-transform:rotate(0deg)">
<scene width="600" id="scene1">
<label t="translate(0,346)">
farnasirim / .vimrc
Created Dec 16, 2017
Poor man's .vimrc
View .vimrc
set ts=4
set sw=4
set smartindent
set ai
set background=dark
colorscheme slate
syntax enable
set nocompatible
filetype plugin indent on
set hlsearch
farnasirim /
Last active Nov 2, 2017
navigate to a go project directory easily using `goto` command
if [ -z "$@" ]; then
echo "Usage: goto project-name"
for i in {1..3}; do
You can’t perform that action at this time.