Skip to content

Instantly share code, notes, and snippets.

View albertoperdomo's full-sized avatar

Alberto Perdomo albertoperdomo

View GitHub Profile
@albertoperdomo
albertoperdomo / Backend-devops_job_offer.md
Last active October 13, 2015 09:18
Backend/Devops Engineer Job Offer

Backend / Devops Engineer at GrapheneDB

GrapheneDB provides cloud-hosted Neo4j graph databases as a service. We're a growing company and we're looking for a Backend Engineer with a strong systems background.

What You'll Be Doing

  • Build and maintain the distributed system that hosts thousands of Neo4j databases and supports hundres of customers.
  • Improve the reliability and efficiency of GrapheneDB core systems.
  • Monitor, investigate and solve errors in our infrastructure, our distributed system and databases, and collaborate on technical support cases.
@albertoperdomo
albertoperdomo / gist:6f3d7ffcb1351e5c61ce
Created October 8, 2014 15:08
Issue with node URLs in transaction endpoint when using X-Forwarded-Host and X-Forwarded-Proto
$ curl -s localhost:7474/db/data/transaction \
-H 'X-Forwarded-Host: db-foo.graphenedb.com:80'
-H 'X-Forwarded-Proto: https'
-H 'Host: db-foo.graphenedb.com'
-H 'Content-Type: application/json'
-d '{"statements":[{"statement":"MATCH n RETURN n","parameters":{},"resultDataContents":["REST"]}]}' | jq .
{
"commit": "https://db-foo.graphenedb.com:80/db/data/transaction/4/commit",
"results": [
{
@albertoperdomo
albertoperdomo / links.txt
Created September 3, 2013 14:58
Useful posts and guidelines on how to price SaaS software.
@albertoperdomo
albertoperdomo / application_controller.rb
Created April 3, 2012 14:51 — forked from Fernan2/application_controller.rb
Duda de inherited_resources
...
def decorate_resource_or_collection(item_or_items)
klass = item_or_items.is_a?(Array) ? item_or_items.first.class.to_s : item_or_items.class.to_s
(klass + "Decorator").constantize.decorate(item_or_items)
rescue NameError
item_or_items
end
...
@albertoperdomo
albertoperdomo / clean_branches.sh
Created March 16, 2012 17:15
Delete all unmerged local branches
git branch | grep -v master | xargs -l1 git branch -d
@albertoperdomo
albertoperdomo / 0-readme.md
Created February 21, 2012 12:47 — forked from burke/0-readme.md
ruby-1.9.3-p125 cumulative performance patch.

Patched ruby 1.9.3-p125 for 30% faster rails boot

What is?

This script installs a patched version of ruby 1.9.3-p125 with patches to make ruby-debug work again (#47) and boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84).

Huge thanks to funny-falcon for the performance patches.

@albertoperdomo
albertoperdomo / ruby-1.9.2-p290
Created February 16, 2012 19:07
Benchmark ruby 1.9.2 vs 1.9.3-p0 vs 1.9.3-p0-perf using https://gist.github.com/1688857 with a Rails 3.1 app
[alberto:~/Code/inmersum → master]$ time rails runner 'p Site'
Site
real 0m11.166s
user 0m9.683s
sys 0m1.224s
@albertoperdomo
albertoperdomo / 0-readme.md
Created February 16, 2012 12:44 — forked from burke/0-readme.md
ruby-1.9.3-p0 cumulative performance patch.

Patched ruby 1.9.3-p0 for 30% faster rails boot

What is?

This script installs a patched version of ruby 1.9.3-p0 with patches to make ruby-debug work again (#47) and boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84).

Huge thanks to funny-falcon for the performance patches.

@albertoperdomo
albertoperdomo / mongify.txt
Created November 21, 2011 16:23
Examples with MongoDB
This is a case study of how we would model parts of the spotify app in MongoDB.
MODEL
=====
users
-----
username
name
plain_txt_password
@albertoperdomo
albertoperdomo / index.html
Created August 19, 2011 17:49
Flexible layout using boxes
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
body {width: 100%; height: 100%; margin: 0px; padding: 0px;}
#layout { background: yellow; display: -webkit-box; -webkit-box-orient: vertical; }
#main-container { background: red; display: -webkit-box; -webkit-box-flex: 1; }
#sidebar { background: green; -webkit-box-flex: 0; }
#map-canvas { background: black; -webkit-box-flex: 1; }