Skip to content

Instantly share code, notes, and snippets.

View OriPekelman's full-sized avatar

Ori Pekelman OriPekelman

View GitHub Profile
F13F33544C1EEBE4DF854477D7949F325DCE58C22B68C252A099D2C78350F255736F990FB3C8

Keybase proof

I hereby claim:

  • I am oripekelman on github.
  • I am oripekelman (https://keybase.io/oripekelman) on keybase.
  • I have a public key whose fingerprint is C1A5 8C41 CA69 E74E 11F3 6BC1 618E BB91 D18D 764B

To claim this, I am signing this object:

{
"name": "yourNewApp",
"description": "MEAN.io: A fullstack JavaScript framework powered by MongoDB, ExpressJS, AngularJS, NodeJS.",
"version": "0.4.2",
"private": false,
"author": "Linnovate <mean@linnovate.net>",
"contributors": "https://github.com/linnovate/mean/graphs/contributors",
"mean": "0.4.2",
"repository": {
"type": "git",
<?php
$path = parse_url($_SERVER['REQUEST_URI']);
$path = rtrim(ltrim(rtrim($path["path"], '/'), '.'),'/'); //trim trailing slash and prefix dots
$index = realpath(getcwd() .$path ."/index.html");
if (substr($index, 0, strlen(realpath(getcwd()))) === realpath(getcwd()) && file_exists($index)){
try {
readfile($index);
exit;
} catch (Exception $e) {
/*Eating all exceptions*/
@OriPekelman
OriPekelman / sphinx_to_gitbook.py
Created May 26, 2015 15:43
Recursively creates an md file for all rst files in the source t directory and below.
#!/usr/bin/env python
'''
Recursively creates an md file for all rst
files in the source directory and below.
'''
import sys, os, re, subprocess
target = 'gitbook/'
source = './'
@OriPekelman
OriPekelman / dlq.js
Created May 31, 2015 12:07
quantized Damreau Lehvenstein in Javascript
(function() {
'use strict';
/**
* Extend an Object with another Object's properties.
*
* The source objects are specified as additional arguments.
*
* @param dst Object the object to extend.
*
@OriPekelman
OriPekelman / Gemfile
Created April 4, 2012 17:48
Minimal File Indexer Elastic Search Example (ruby)
source :rubygems
gem 'tire'
gem 'sinatra'
@OriPekelman
OriPekelman / ori-rulu
Created June 23, 2012 12:46
My #rulu presentation, what did Tony Arcieri did lately?
data:text/html;charset=utf-8,%3C%21doctype%20html%3E%3Chtml%20lang%3D%22en%22%3E%3Chead%3E%20%3Cmeta%20charset%3D%22utf-8%22%20/%3E%20%20%20%20%3Cmeta%20name%3D%22viewport%22%20content%3D%22width%3D1024%22%20/%3E%20%20%20%20%3Cmeta%20name%3D%22apple-mobile-web-app-capable%22%20content%3D%22yes%22%20/%3E%20%20%20%20%3Ctitle%3EDeck%20Title%3C/title%3E%20%20%20%20%20%20%20%20%3Cmeta%20name%3D%22description%22%20content%3D%22TODO%22%20/%3E%20%20%20%20%3Cmeta%20name%3D%22author%22%20content%3D%22TODO%22%20/%3E%20%20%20%20%3Cstyle%3E%20%20%20%20.componentContainer%20%7B%20%20%20%20%20%20%20%20position%3A%20absolute%3B%20%20%20%20%20%20%20%20-webkit-transform-origin%3A%200%200%3B%20%20%20%20%20%20%20%20-moz-transform-origin%3A%200%200%3B%20%20%20%20%20%20%20%20transform-origin%3A%200%200%3B%20%20%20%20%7D%20%20%20%20%3C/style%3E%20%20%20%20%3Clink%20href%3D%22http%3A//tantaman.github.com/Strut/client/web/preview_export/css/main.css%22%20rel%3D%22stylesheet%22%20/%3E%20%20%20%20%20%20%20%20%3Clink%20rel%3D%22shortcut
@OriPekelman
OriPekelman / slugify.py
Last active October 10, 2015 17:35
domain compatible slugifcation
#!/usr/bin/python
# coding=UTF-8
import re
import unicodedata
import string
import random
first_cap_re = re.compile('(.)([A-Z][a-z]+)')
all_cap_re = re.compile('([a-z0-9])([A-Z])')
def slugify(value):
"""
@OriPekelman
OriPekelman / Gemfile
Last active December 19, 2015 18:49
The HTTP gem failing urls
source 'https://rubygems.org'
gem 'http', :path =>'/Users/oripekelman/Sites/http'
gem 'sinatra'