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 hub.db | |
(:require [clojure.tools.logging :as log] | |
[clojure.java.jdbc :as jdbc] | |
[mount.core :refer [defstate]] | |
[cheshire.core :refer [parse-string generate-string]] | |
[config.core :refer [env]] | |
[hub.util :as util] | |
[honeysql.core :as sql] | |
[honeysql.helpers :refer [merge-where]]) | |
(:import [java.sql PreparedStatement] |
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
<form method="POST" @submit="validateBeforeSubmit"> | |
<span>Name</span> | |
<input type="text" class="formText" v-model.trim="user.username"> | |
<p class="bind-error" v-show="validation.hasError('user.username')">{{validation.firstError('user.nickname')}}</p> | |
</form> |
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
(let [in (java.io.PipedInputStream.) | |
out (java.io.PipedOutputStream.) | |
buf (java.io.BufferedWriter. (java.io.OutputStreamWriter. out))] | |
(.connect out in) | |
(doto buf | |
(.write "abdf") | |
(.write "abadfdf") | |
(.flush)) |
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
@Service | |
@GraphQLApi | |
public class GitHubService { | |
@Autowired | |
RestTemplate restTemplate; | |
@Bean | |
RestTemplate restTemplate() { |
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 apples.core | |
(:require [play-clj.core :refer :all] | |
[play-clj.g2d :refer :all] | |
[play-clj.math :refer :all])) | |
(declare apples main-screen) | |
(def speed 14) | |
(defn- get-direction [] | |
(cond |
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
package main | |
import ( | |
"bytes" | |
"fmt" | |
"io" | |
"log" | |
"mime/multipart" | |
"net/http" | |
"os" |
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
import com.fasterxml.jackson.databind.SerializationFeature | |
import com.google.api.services.docs.v1.Docs | |
import com.google.api.services.drive.Drive | |
import io.ktor.application.Application | |
import io.ktor.application.call | |
import io.ktor.application.install | |
import io.ktor.features.* | |
import io.ktor.http.ContentType | |
import io.ktor.http.HttpStatusCode | |
import io.ktor.http.content.resources |
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 backend.google.oauth | |
(:require [cheshire.core :refer [parse-string generate-string]] | |
[mount.core :refer [defstate]] | |
[buddy.core.keys :as keys] | |
[buddy.core.dsa :as dsa] | |
[backend.config :refer [env]] | |
[org.httpkit.client :as http]) | |
(:import org.apache.commons.codec.binary.Base64)) | |
(def access_token (atom nil)) | |
(defstate private-key :start (-> env |
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
import okhttp3.MediaType.Companion.toMediaType | |
import okhttp3.OkHttpClient | |
import okhttp3.Request | |
import okhttp3.RequestBody.Companion.toRequestBody | |
import java.io.IOException | |
import java.io.InputStream | |
import java.security.KeyStore | |
import java.security.KeyStoreException | |
import java.security.NoSuchAlgorithmException | |
import java.security.cert.CertificateException |
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
{:http {:port 9090 :handler #ig/ref :handler/app} | |
:handler/app {}} |
OlderNewer