Technology & Design (un)Conference: No Spectators, Only Participants
"One of the best uses of my Saturday in as long as I can remember." -
# 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 |
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 |
{"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 |
tap 'caskroom/cask' | |
tap 'homebrew/bundle' | |
tap 'homebrew/core' | |
tap 'homebrew/dupes' | |
tap 'jimbojsb/launchrocket' | |
tap 'homebrew/dupes' | |
tap 'josegonzalez/php' | |
brew 'curl' |
#!/bin/sh | |
KERNEL="/Users/oripekelman/Sites/xhyve-platform/tmp/cd/install.386/vmlinuz" | |
INITRD="initrd.img" | |
CMDLINE="modules=sd-mod,ext4,console quiet console=ttyS0 acpi=on" | |
MEM="-m 1G" | |
NET="-s 2:0,virtio-net" | |
IMG_HDD="-s 4,virtio-blk,hdd.img" |
dependencies: | |
ruby: | |
"wkhtmltopdf-binary": "> 0.0" |
/** | |
* Automatically Create named ranges for each column | |
* | |
* NOTE THAT IT DESTORYS ALL OTHER NAMED RANGES ON EVERY EDIT IN EVERY SHEET | |
* | |
* Public Domain by Ori Pekelman (2017) | |
**/ | |
function addNamedRanges(SS, s, number_of_sheets){ |
cat /var/log/php.access.log| awk '{print $6}' | sort -n | awk ' BEGIN { c = 0; sum = 0; min = 0; max =0 } {c++; a[c] = $1; sum += $1;} END { ave = sum / c; if( (c % 2) == 1 ) { median = a[ int(c/2) ]; } else { median = ( a[c/2] + a[c/2-1] ) / 2; min=a[0]; max = a[c-1]; } OFS="\t"; print "Count", "Average", "Median", "Min", "Max"; print c, ave, median, min, max; }' |
#!/usr/bin/env ruby | |
require "base64" | |
require "json" | |
if ARGV.length != 3 then #expecting precisely 3 arguments | |
puts "usage: rels_to_env [relationship name] [environment variable prefix] [start command]\n\nExample:\nexport_rels mysql DB \"java -jar myapp.jar\"\n\noutput:\nexport DB_HOST=\"database.internal\”\nexport DB_PORT=...\n" | |
else | |
rels = JSON.parse(Base64.decode64(ENV['PLATFORM_RELATIONSHIPS'])) | |
rel_name= ARGV[0] | |
prefix = ARGV[1] |