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
<html> | |
<head> | |
<link rel="stylesheet" type="text/css" href="https://rawgit.com/facebook/fixed-data-table/5e72a326c16b667ec6f38cb47147c74daeaaf956/dist/fixed-data-table.css"> | |
</head> | |
<div id="content"></div> | |
<body> | |
<!-- The none minified version of react throws: |
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 parser | |
(:require [clojure.tools.reader :as reader] | |
[clojure.tools.reader.reader-types :as rt] | |
[clojure.zip :as zip])) | |
(defn try-read [rdr] | |
(when rdr | |
(reader/read rdr false ::EOF))) |
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 acme-auth.store | |
(:require [clojure.java.jdbc :as jdbc])) | |
(defn add-user! [ds user] | |
(jdbc/with-db-transaction [conn ds] | |
(let [res (jdbc/insert! conn | |
:user | |
{:username (:username user) :password (:password user)}) | |
user-id ((keyword "scope_identity()") (first res))] |
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 acme-auth.store | |
(:require [clojure.java.jdbc :as jdbc])) | |
(defn- find-user-roles [conn user-id] | |
(let [id (jdbc/query conn "select sysdate from dual")] | |
(map (fn [row] {:role-id (:id row) :application-id (:application_id row)}) | |
(jdbc/query conn ["select r.id, r.application_id | |
from role r | |
inner join user_role ur on r.id = ur.role_id | |
where ur.user_id = ?" user-id])))) |
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
;given store.clj with a function like | |
(defn find-user-by-id3 [conn id] | |
(when-let [user | |
(first | |
(jdbc/query conn ["select * from user where id = ?" id]))] | |
(assoc user :user-roles (find-user-roles conn (:id user))))) | |
; and a service.clj with a usage like | |
(defn refresh-auth-token [ds auth-conf refresh-token] | |
(if-let [unsigned (unsign-token auth-conf refresh-token)] |
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
buildscript { | |
repositories { jcenter() } | |
dependencies { classpath 'org.hidetake:gradle-ssh-plugin:0.1.7' } | |
} | |
apply plugin: 'ssh' | |
remotes { | |
test { | |
host = '192.168.255.1' |
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
// what i want | |
// buildscript { classpath 'com.oracle:ojdbc6:11.2.0.2.0' } | |
configurations { | |
gradleRuntime {transitive = false} | |
} | |
dependencies { |
NewerOlder