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

(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
# 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"
<twitter:config name="jsonTwitter" format="JSON"
consumerKey="${twitter.consumer.key}" consumerSecret="${twitter.consumer.secret}"/>
<flow name="twitter-search">
<poll frequency="5000">
<twitter:search query="mule" config-ref="jsonTwitter" />
</poll>
</flow>