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 org.whitlark.fc | |
(:import [org.apache.camel.impl DefaultCamelContext]) | |
(:import [org.apache.camel.builder RouteBuilder]) | |
(:gen-class)) | |
(defn -main [& args] | |
(let [context (DefaultCamelContext.)] | |
(.addRoutes context (proxy [RouteBuilder] [] | |
(configure [] | |
(.. this (from "file:/home/jw/scratch/inbox?noop=true") |
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
#! /usr/bin/env ruby | |
require 'rubygems' | |
gem 'rake', '>= 0.7.3' | |
require 'rake' | |
Dir.chdir('where/I/want/to/be') | |
Rake.application.init('my-script-name') |
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
(defn clock-view [app owner] | |
(reify | |
om/IWillMount | |
(will-mount [_] | |
(js/setInterval | |
(fn [] (om/transact! app :time (fn [_] (js/Date.)))) | |
100)) | |
om/IRender | |
(render [_] | |
(dom/div nil (. (:time app) toUTCString))))) |
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
(defn listen [el & types] | |
(let [out (chan)] | |
(doall (map (fn [type] (events/listen el type #(put! out %))) types)) | |
out)) | |
(defn set-states! [owner desired] | |
(doall (map #(om/set-state! owner (key %) (val %)) desired))) |
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
(defn scrubbing-int-state-view [app owner] | |
(let [start-capturing #(do (om/set-state! owner :capturing true) | |
(om/set-state! owner :start-x (.-clientX %))) | |
stop-capturing #(do (om/set-state! owner :capturing false) | |
(om/set-state! owner :start-x nil))] | |
(reify | |
om/IInitState | |
(init-state [_] | |
{:my-val 0 | |
:capturing false |
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
(if (zero? (mod difference 5)) | |
(do (om/update-state! owner :my-val (partial + (/ difference 5))) | |
(om/set-state! owner :start-x x))) |
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
(defn scrubbing-int-app-event-view-2 [app owner] | |
(reify | |
om/IInitState | |
(init-state [_] | |
{:capturing false | |
:start-x nil}) | |
om/IWillMount | |
(will-mount [_] | |
(let [mouse-chan (async/map (fn [e] {:x (.-clientX e) | |
:type (.-type e)}) |
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 foo.auth.google | |
(:require [clojure.string :as str] | |
[clojure.java.io :as io] | |
[clojure.data.json :as json] | |
[clojure.logging :refer :all] | |
[friend-oauth2.util :refer [format-config-uri]] | |
[friend-oauth2.workflow :as oauth2]) | |
(:import [java.security.cert CertificateFactory] | |
[org.apache.commons.codec.binary Base64])) |
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 reagent-test.core | |
(:require [reagent.core :as reagent :refer [atom]] | |
[datascript :as d] | |
[cljs-uuid-utils :as uuid])) | |
(enable-console-print!) | |
(defn bind | |
([conn q] | |
(bind conn q (atom nil))) |
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 example.api.google | |
(:require [cemerick.url :as url] | |
[cheshire.core :as json] | |
[clj-jwt.core :as jwt] | |
[clj-jwt.key :as key] | |
[clj-time.core :as time] | |
[clj-http.client :as http] | |
[clojure.string :as str]) | |
(:import java.io.StringReader)) |
OlderNewer