Skip to content

Instantly share code, notes, and snippets.

View dsapoetra's full-sized avatar

Dimas Saputra dsapoetra

View GitHub Profile
(def data (read-string (slurp directory-content-1)))
(defn count-published []
(count (filter #(= "published" (get % :publicity)) data)))
(defn count-all []
(count data))
#include "A.h"
#include <iostream>
using namespace std;
A::A(){
cout<<"ctor default A"<<endl;
n = 0;
}
A::A(int nn){
(defn html1 []
;;(dom/destroy! (dom/by-id "content"))
(dom/set-inner-html! (dom/by-id "idofhtml")
"<h1> lorem ipsum </h1>"))
(defn ^:export init []
(when (and js/document
(.-getElementById js/document))
(ev/listen! (dom/by-id "link1") :click html1)
(ev/listen! (dom/by-id "link2") :click html2)
@dsapoetra
dsapoetra / core.clj
Created September 6, 2014 09:02
abhimata-backend
(ns abhimata-backend.core
(:gen-class)
(:import org.postgresql.util.PGobject)
(:require [cemerick.friend :as friend :as friend]
(cemerick.friend [workflows :as workflows]
[credentials :as creds])
[compojure.core :as compojure
:refer (GET POST ANY defroutes)]
[clojure.java.jdbc :as jdbc]
[ring.adapter.jetty :as jetty]