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 / vagrant-scp.md
Last active February 2, 2016 22:26 — forked from geedew/vagrant-scp
Copying files to a Vagrant VM from host
OPTIONS=`vagrant ssh-config | grep -v '^Host ' | awk -v ORS=' ' 'NF{print "-o " $1 "=" $2}'`

To copy a file from the host to a Vagrant VM:

scp ${OPTIONS} $FILE v:$PATH

to copy a file from a Vagrant VM to the host:

scp ${OPTIONS} v:$PATH $FILE

@ddossot
ddossot / gist:3a5279e1e04f8935e71a
Created July 10, 2015 15:33
Deleted Holus comment

I've posted the following comment on this Techvibes article: Holus, a Tabletop Holographic Display, Meets Crowdfunding Goal in 19 Minutes

Holus is very interesting as a new type of display device. I had the chance to try it and really enjoyed it. Technically, it's very much like the N-3D demoed here. It's based on the Pepper's Ghost illusion so it's not holographic: you see a ghostly 2-D image for each of the 4 angles of view. This said it's a really engaging experience, especially when you have 4 people sitting around it!

My comment has been deleted...

(ns foobar.components
(:require [com.stuartsierra.component :as component]
[compojure.api.sweet :refer :all]))
(defmethod compojure.api.meta/restructure-param :components
[_ components acc]
(update-in acc [:letks] into [components `(::components ~'+compojure-api-request+)]))
(defn wrap-components [handler components]
(fn [req]
echo "Flipping tables! (╯°□°)╯︵ ┻━┻"
num_rules=3
real=3 # exposed to the ELB as port 443
test=4 # used to install test certs for domain verification
health=5 # used by the ELB healthcheck
blue_prefix=855
green_prefix=866
@ddossot
ddossot / rxmule-java8.java
Created February 9, 2015 23:42
RxMule Java 8 Sample
rxMule
.observeEndpointAsync(new URI("http://localhost:8080/publish"))
.distinct(
muleEvent -> {
final String remoteAddressAndPort =
muleEvent
.getMessage()
.getInboundProperty(
"MULE_REMOTE_CLIENT_ADDRESS");
@ddossot
ddossot / README.md
Last active August 29, 2015 14:14
EC2 node discovery for Hazelcast

Alternative implementation of TcpIpJoinerOverAWS

This is a workaround for this Hazelcast issue.

To use the alternative TcpIpJoinerOverAWS:

  • Remove hazelcast-cloud from your project's classpath,
  • Add this class in your project or JAR it up if you prefer,
  • Do not configure an accessKey nor a secretKey in Hazelcast's AwsConfig.
@ddossot
ddossot / aws-lookup.sh
Created October 10, 2014 16:57
A little helper to lookup AWS instances in one region: fetches by tag and returns public DNS name and tag values.
function aws-lookup() {
aws ec2 describe-instances --region $1 --filters "Name=tag:Name,Values=$2*" --query='Reservations[*].Instances[*].[PublicDnsName,Tags[*].Value]' --output text
}
@ddossot
ddossot / ITCase.java
Last active April 6, 2018 11:56
Integration tests with REST Assured and Jetty
@BeforeClass
public static void configureRestAssured() throws Exception
{
RestAssured.port = Integer.getInteger("api.server.port");
RestAssured.basePath = System.getProperty("api.server.path") + "/api/v1";
}
@ddossot
ddossot / affirmation
Created September 16, 2014 02:44
MuleSoft Contributor Agreement Acceptance by David Dossot
I, David Dossot, have read and do accept the MuleSoft Contributor Agreement
at http://www.mulesoft.org/legal/contributor-agreement.html
Accepted on Mon Sep 15 2014 19:44:30 GMT-0700 (PDT)
@ddossot
ddossot / msca-ddossot.md
Last active August 29, 2015 14:06
Acceptance of MuleSoft Contributor Agreement