again?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
onContainerDataSaved = function (container) { | |
let networkData | |
try { | |
networkData = network.fetchNetworkData() | |
network.attachContainerToNetwork(networkData, container) | |
websockets.sendErrorToClients("Cannot attach container to the network") | |
} catch (err) { | |
if (err instanceof NetworkAttachError) { | |
messageBus.emit('network.attach.failed', { container, networkData }) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ideally those should be sent in parallel | |
// failure of one shouldn't impact failure of others | |
function sendNotifications (data, instance, container) { | |
try { | |
slack.sendNotification(data, instance, container) | |
} catch (err) { | |
// retry sending a message | |
slack.sendNotification(data, instance, container) | |
} | |
try { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"name":"palantiri","commit":"e8d147487e65d9dcf2f90ba9827c7e3ee3e23cfa","environment":"production-delta","hostname":"palantiri","pid":15,"tx":true,"module":"Swarm","method":"getHostsWithOrgs","level":10,"info":{"ID":"","Containers":14457,"ContainersRunning":3122,"ContainersPaused":0,"ContainersStopped":11335,"Images":6485,"Driver":"","DriverStatus":null,"SystemStatus":[["Role","primary"],["Strategy","spread"],["Filters","health, port, containerslots, dependency, affinity, constraint"],["Nodes","257"],[" (unknown)","10.8.204.92:4242"],[" ? ID",""],[" ? Status","Pending"],[" ? Containers","0"],[" ? Reserved CPUs","0 / 0"],[" ? Reserved Memory","0 B / 0 B"],[" ? Labels",""],[" ? Error","Cannot connect to the Docker daemon. Is the docker daemon running on this host?"],[" ? UpdatedAt","2016-08-03T16:55:09Z"],[" ? ServerVersion",""],[" ip-10-8-192-52.9487339","10.8.192.52:4242"],[" ? ID","SRSN:VBV3:4ZSI:J3HF:AXQF:KZWX:2SJH:7TUY:N3KG:WEP5:AIHP:5FSQ"],[" ? Status","Healthy"],[" ? Containers","36"],[" ? Reserved CPUs" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Full list of versions available here: https://registry.hub.docker.com/_/node/tags/manage/\n' + | |
FROM node:0.10.38 | |
# Open up ports on the container | |
EXPOSE 80 8000 8080 3000 | |
# Add repository files to container | |
ENV BASE_URL=http://metalsmith-blog-staging-runnable.runnableapp.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Datomic example code | |
;; demonstrates various update scenarios, using a news database | |
;; that contains stories, users, and upvotes | |
;; grab an in memory database | |
(use '[datomic.api :only (q db) :as d]) | |
(def uri "datomic:mem://foo") | |
(d/create-database uri) | |
(def conn (d/connect uri)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://blog.jetbrains.com/idea/2014/03/intellij-idea-13-1-rc-introduces-sublime-text-style-multiple-selections/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns nace.core | |
(:require [cheshire.core :refer :all])) | |
(def st (slurp "./resources/nace.json" :encoding "UTF-8")) | |
(defn remove-dots [s] | |
(clojure.string/replace s "." "")) |
A Pen by Captain Anonymous on CodePen.
NewerOlder