Skip to content

Instantly share code, notes, and snippets.

Le Wang lewang

Block or report user

Report or block lewang

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View context startup logs.txt
ubuntu@ip-172-31-30-143:~$ sudo docker logs contexts-service
Retreiving vault root token from url "http://:8201/client-token" ...
curl: (6) Could not resolve host:
... failed to retrieve root token.
Retrying 9 more times ...
curl: (6) Could not resolve host:
... failed to retrieve root token.
Retrying 8 more times ...
curl: (6) Could not resolve host:
... failed to retrieve root token.
View gist:1b843aeca020f9f7b88b12f28571f49f
(ns workflows-conductor.le-workspace-join
(:require [clojure.set :refer [difference
intersection
union]]))
(defn inner-join
[left-keys right-keys]
(intersection (set left-keys) (set right-keys)))
(defn outer-join
View article.md

Intro

In the previous installment(linkify), we saw how Docker images add power and customization to the build process.

In this installment we'll show you how to amplify that power by using the CircleCI 2.0 "workflows" feature.

Workflows in detail

@lewang
lewang / transducers.clj
Last active Aug 2, 2017 — forked from ptaoussanis/transducers.clj
Quick recap/commentary: Clojure transducers
View transducers.clj
(comment ; Fun with transducers, v2
;; Still haven't found a brief + approachable overview of Clojure 1.7's new
;; transducers in the particular way I would have preferred myself - so here goes:
;;;; Definitions
;; Looking at the `reduce` docstring, we can define a 'reducing-fn' as:
(fn reducing-fn ([]) ([accumulation next-input])) -> new-accumulation
;; (The `[]` arity is actually optional; it's only used when calling
;; `reduce` w/o an init-accumulator).
View clojure.org[*Org Src clojure.clj
;;; `filter' **MAY** introduce chunkedness, therefore should only be used with
;;; pure functions.
(defn integers-from [n]
(lazy-seq (cons n (do (print \.) (integers-from (inc n))))))
;;; ⇒ #'user/integers-from
(defn chunked-test [xs]
(let [times-called (atom 0)
View mac_docker_say_when_done.sh
#!/usr/bin/env bash -x
function getUsage()
{
echo $(ps -A -o "%cpu command" | grep com.docker.hyperkit | grep -v grep | head -1 | cut -f1 -d.)
}
while [ $(getUsage) -gt 50 ]; do
sleep 3
done
View star yml.txt
version: 2
jobs:
build:
docker:
- image: finanzcheck/docker-node-java
working_directory: ~/starfish
steps:
- checkout
- run:
name: Install Dependencies
View *vc-diff*.diff
diff --git a/k8s/production/workflows-conductor-deployment.yaml b/k8s/production/workflows-conductor-deployment.yaml
index 1440a18..305c0d3 100644
--- a/k8s/production/workflows-conductor-deployment.yaml
+++ b/k8s/production/workflows-conductor-deployment.yaml
@@ -83,6 +83,10 @@ spec:
# circleci/circle as a library env-vars
- name: CIRCLE_ENV
value: "production"
+ - name: NREPL_PORT
+ value: "6005"
View *Diff*.diff
diff -u --label /Users/lewang/src/circleci/workflows-conductor/k8s/production/workflows-conductor-deployment.yaml --label \#\<buffer\ workflows-conductor-deployment.yaml\<production\>\> /Users/lewang/src/circleci/workflows-conductor/k8s/production/workflows-conductor-deployment.yaml /var/folders/1j/g0fjg7qs4gd4xxhrdnk73n200000gn/T/buffer-content-83717g9g
--- /Users/lewang/src/circleci/workflows-conductor/k8s/production/workflows-conductor-deployment.yaml
+++ #<buffer workflows-conductor-deployment.yaml<production>>
@@ -83,6 +83,8 @@
# circleci/circle as a library env-vars
- name: CIRCLE_ENV
value: "production"
+ - name: NREPL_PORT
+ value: 6005
- name: CIRCLE_SECRETS_URI
View anki.clj
(ns anki
"Some anki manipulation CSV handling."
(:require [clojure.data.csv :as csv]
[clojure.java.io :as io]
clojure.string))
(defn times-table-rows []
(let [tuples (for [i (range 2 10)
j (range 2 10)
You can’t perform that action at this time.