Skip to content

Instantly share code, notes, and snippets.

Ori Pekelman OriPekelman

Block or report user

Report or block OriPekelman

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
@OriPekelman
OriPekelman / Gemfile
Created Apr 4, 2012
Minimal File Indexer Elastic Search Example (ruby)
View Gemfile
source :rubygems
gem 'tire'
gem 'sinatra'
@OriPekelman
OriPekelman / ori-rulu
Created Jun 23, 2012
My #rulu presentation, what did Tony Arcieri did lately?
View ori-rulu
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 / Gemfile
Last active Dec 19, 2015
The HTTP gem failing urls
View Gemfile
source 'https://rubygems.org'
gem 'http', :path =>'/Users/oripekelman/Sites/http'
gem 'sinatra'
View gist:a1e8d08a46ba703e5e1b
F13F33544C1EEBE4DF854477D7949F325DCE58C22B68C252A099D2C78350F255736F990FB3C8
View keybase.md

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:

View package.json
{
"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",
View servig a static web site with platform.sh
<?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
Recursively creates an md file for all rst files in the source t directory and below.
View sphinx_to_gitbook.py
#!/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
quantized Damreau Lehvenstein in Javascript
View dlq.js
(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 / slugify.py
Last active Oct 10, 2015
domain compatible slugifcation
View slugify.py
#!/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):
"""
You can’t perform that action at this time.