Skip to content

Instantly share code, notes, and snippets.

View ddossot's full-sized avatar
:shipit:
s̴̝̺̫͖̞͛̑͆̀̽̕ḩ̵͌̀͘í̴̝̰͉̒́̐͗p̶̯͍͎͒̿́̈́̕

David Dossot ddossot

:shipit:
s̴̝̺̫͖̞͛̑͆̀̽̕ḩ̵͌̀͘í̴̝̰͉̒́̐͗p̶̯͍͎͒̿́̈́̕
View GitHub Profile
@ddossot
ddossot / gist:d3194836fc17993c42aa
Last active February 3, 2016 21:30
Ruby/jRuby Rack application face-off

Simple Rack application

  • Grape middleware
  • MySQL DB
  • ab -n 2000 -c 20

Running on jRuby 1.7.14 / Vertx 2.1.1 / JDK8

  • Java HotSpot(TM) 64-Bit Server VM (build 25.20-b22, mixed mode)
@ddossot
ddossot / gist:59cb3b2911bb929b89c1
Created August 11, 2014 18:41
require time MRI vs JRuby
$ rbenv local 2.0.0-p451
$ irb
irb(main):001:0> require 'benchmark'
=> true
irb(main):002:0> puts Benchmark.measure { require 'aws-sdk' }
0.060000 0.010000 0.070000 ( 0.066320)
$ rbenv local jruby-1.7.12
$ irb
irb(main):001:0> require 'benchmark'

Keybase proof

I hereby claim:

  • I am ddossot on github.
  • I am ddossot (https://keybase.io/ddossot) on keybase.
  • I have a public key whose fingerprint is E5AB B599 4BA9 9081 F42A FCA2 1958 EF81 D3F4 D271

To claim this, I am signing this object:

# Lint JSON with jq (the exit 255 stops xargs after the first failed command)
find . -name "*.json" -print | xargs -Ixx bash -c "echo JSON linting xx 1>&2; cat xx | jq '.' > /dev/null || exit 255"
@ddossot
ddossot / gist:9144078
Created February 21, 2014 21:38
Mule MX4J Agent
<management:jmx-mx4j-adaptor />
@ddossot
ddossot / gist:6346057
Created August 26, 2013 20:10
Raw HTTP Proxy (Mule)
<flow name="rawProxy">
<http:inbound-endpoint
address="http://localhost:${http.port}/rest-proxies/raw"
exchange-pattern="request-response" />
<copy-properties propertyName="*" />
<http:outbound-endpoint address="http://localhost:${http.port}/rest/#[message.inboundProperties['http.relative.path']]?#[message.inboundProperties['http.query.string']]"
exchange-pattern="request-response" />
<response>
<copy-properties propertyName="*" />
</response>
@ddossot
ddossot / mule-redis-web-bug.xml
Created August 5, 2013 17:50
Mule Redis Connector Sample Configuration
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:redis="http://www.mulesoft.org/schema/mule/redis"
xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.4.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/redis http://www.mulesoft.org/schema/mule/redis/3.4/mule-redis.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd">
@ddossot
ddossot / MuleKick.java
Created July 29, 2013 21:21
Simple Mule Bootstrapper
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import org.mule.api.MuleContext;
import org.mule.api.config.ConfigurationBuilder;
import org.mule.api.context.MuleContextBuilder;
import org.mule.api.context.MuleContextFactory;
import org.mule.config.AnnotationsConfigurationBuilder;
import org.mule.config.spring.SpringXmlConfigurationBuilder;
[
{
"heat": 17529,
"id": 24,
"name": "Seaport Square - Seaport Blvd. at Boston Wharf"
},
{
"heat": 12843,
"id": 64,
"name": "Congress / Sleeper"
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:json="http://www.mulesoft.org/schema/mule/json" xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns:neo4j="http://www.mulesoft.org/schema/mule/neo4j" xmlns:file="http://www.mulesoft.org/schema/mule/file"
xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.4.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/neo4j http://www.mulesoft.org/schema/mule/neo4j/current/mule-neo4j.xsd