This file contains 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
apiVersion: v1 | |
kind: Secret | |
metadata: | |
name: mysecret | |
type: Opaque | |
data: | |
hello: d29ybGQ= | |
--- | |
apiVersion: v1 | |
kind: Pod |
This file contains 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
; For each attribute being auto-inc'ed, this will create a unique entity with :db/ident (str :ns/orig-attr "-auto-inc") | |
; i.e. for :order/num, there will be an entity :order/num-auto-inc | |
; That entity will have a ::current-id attribute containing the current auto-inc value | |
; schema | |
[{:db/id (d/tempid :db.part/db) | |
:db/ident ::num | |
:db/valueType :db.type/long | |
:db/cardinality :db.cardinality/one | |
:db/unique :db.unique/value |
This file contains 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 twitter | |
(:use [environ.core] | |
[twitter.oauth] | |
[twitter.api.restful]) | |
(:require [clj-time.format :as f] | |
[clj-http.client :as clj-http])) | |
(def tw-consumer-key (env :tw-consumer-key)) | |
(def tw-consumer-secret (env :tw-consumer-secret)) | |
(def tw-user-access-token (env :tw-user-access-token)) |
This file contains 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 tic-tac-toe.core | |
(:use [clojure.pprint])) | |
(def board (take 9 (repeat nil))) | |
(defn- print-board-cell [cell] | |
(cond | |
(= :o cell) "O" | |
(= :x cell) "X" | |
:else ".")) |
This file contains 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
; original https://github.com/hozumi/datomic-session | |
; https://github.com/hozumi/datomic-session/blob/master/epl-v10.html | |
(ns datomic-session | |
(:use [always] | |
[clojure.pprint]) | |
(:require [clojure.data :as data] | |
[datomic.api :as d] | |
[my-ns.db.datomic :as db] | |
[ring.middleware.session.store :as rs] | |
[ring.middleware.session.memory :as memstore])) |
This file contains 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
; dashboard | |
(defn get-dashboard [] | |
(let [questions (future (questions/get-top-questions 5)) | |
companies (future (companies/get-top-companies 5)) | |
profiles (future (profiles/get-top-profiles 5)) | |
music (future (profiles/get-top-music 5))] | |
{:questions @questions | |
:companies @companies | |
:profiles @profiles | |
:music @music |
This file contains 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
@Grapes([ | |
@Grab("com.tinkerpop.gremlin:gremlin-groovy:1.5"), | |
@Grab("org.spockframework:spock-maven:0.6-groovy-1.8") | |
]) | |
import com.tinkerpop.gremlin.groovy.* | |
import spock.lang.Specification | |
import spock.lang.Shared | |
import com.tinkerpop.blueprints.pgm.Graph | |
import com.tinkerpop.blueprints.pgm.impls.tg.TinkerGraphFactory |