Skip to content

Instantly share code, notes, and snippets.

View OriPekelman's full-sized avatar

Ori Pekelman OriPekelman

View GitHub Profile
{"completion_percent":100,"log":"EnvironmentBranchActivity#tqh5yaygio4ls: Executing activity\nCreating branch refs/heads/plip from branch refs/heads/plop\nBuilding application 'app' (runtime type: php:7.0, tree: 01c62a6)\n Slug already built for this tree id, skipping.\n\nCreating environment marbybgp54ie6-plip-mff2xhi.\n Environment configuration:\n app (type: php:7.0, size: S, disk: 2048)\n mysqldb (type: mysql:10.0, size: S, disk: 2048)\n\n Environment routes:\n http://plip-mff2xhi-marbybgp54ie6.eu.platform.sh/ is served by application `app`\n https://plip-mff2xhi-marbybgp54ie6.eu.platform.sh/ is served by application `app`\n\n","parameters":{"environment":"plip","user":"384491da-031e-4c23-b264-9f96040a6e36","parent":"plop"},"created_at":"2016-10-24T19:11:15.172871+00:00","updated_at":"2016-10-24T19:11:51.028092+00:00","environments":["plop","plip"],"payload":{"outcome":{"status":"inactive","head_commit":null,"machine_name":"plip-mff2xhi","name":"plip","parent":"plop","title":"plip","created
require "rubygems"
require 'rmeetup'
client= RMeetup::Client.new({api_key: "getyourown"})
results = client.fetch(:rsvps,{event_id: 229384168, urlname: "Paris-Datageeks"})
members = results.select{|result|result.rsvp["response"]=="yes"}.map { |result| {name: result.rsvp["member"]["name"], image: result.rsvp["member_photo"].nil? ? "" : result.rsvp["member_photo"]["thumb_link"]}}
puts members.inspect
@OriPekelman
OriPekelman / reset_platformsh_project.sh
Created February 4, 2016 10:12
Jenkins Job To reset a platform project (used for demos)
# You should export the following variables:
# $API_TOKEN which you get from marketplace
# $PROJECT_ID the platform project like 'hzdp3vdw4poyg'
# $ENVIRONMENT for example 'master'
# $BACKUP_ID which you can get from the CLI
COMPOSER=$(command -v composer >/dev/null 2>&1) || true
if [ -z "$COMPOSER" ] && [ ! -f .build/composer.phar ]; then
mkdir -p .build
curl -sS https://getcomposer.org/composer.phar > .build/composer.phar
@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 / 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 / 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 = './'
<?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*/
{
"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",

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:

F13F33544C1EEBE4DF854477D7949F325DCE58C22B68C252A099D2C78350F255736F990FB3C8