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
;;;Server Side code which retrieves a html fragment from client | |
(ns faiz.client.transforms | |
(:require [enfocus.core :as ef]) | |
(:use-macros [enfocus.macros :only [append defsnippet content at set-attr html-content]]) | |
(:require-macros [fetch.macros :as fm]) | |
(:use [faiz.client.utils :only [log]])) | |
(defn doc [] js/document) |
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></head> | |
<body> | |
<top-navbar> | |
<div class="navbar navbar-fixed-top"> | |
<div class="navbar-inner"> | |
<div class="container"> | |
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> | |
<span class="icon-bar"></span> | |
<span class="icon-bar"></span> |
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 faiz.client.reg | |
(:require [crate.core :as crate] | |
[cljsbinding :as binding] | |
[faiz.client.transforms :as tr] | |
[faiz.client.controls :as ctrls] | |
[enfocus.core :as ef]) | |
(:use-macros [crate.def-macros :only [defhtml]] | |
[enfocus.macros :only [append defsnippet content at set-attr html-content deftemplate]])) | |
(defn render [] |
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 faiz.client.transforms | |
(:require [enfocus.core :as ef] | |
[faiz.client.common :as cm]) | |
(:use-macros [enfocus.macros :only [append defsnippet content at set-attr html-content]] | |
[fetch.macros :only [letrem]]) | |
(:require-macros [fetch.macros :as fm]) | |
(:use [faiz.client.utils :only [log]])) | |
(defn doc [] js/document) |
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
<form class="form-horizontal"> | |
<fieldset> | |
<legend>Student Registeration Form</legend> | |
<div class="control-group"> | |
<label class="control-label" id="first">First Name</label> | |
<div class="controls"> | |
<input type="text" class="input-xlarge"/> | |
</div> | |
</div> |
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 pm.client.models | |
(:require [pm.client.utils :as utils] | |
[shoreleave.pubsubs.simple :as pbus] | |
[shoreleave.client.pubsubs.protocols :as pubsub])) | |
(def proj (atom {:hello 2})) | |
(def bus (pbus/bus)) | |
(pubsub/publishize proj bus) | |
(pubsub/subscribe bus proj #(js/console.log (pr-str %))) |
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 actions.clj | |
(:require [pallet.core] | |
[pallet.compute] | |
[pallet.action.package])) | |
(def hardware-types {:micro "t1.micro" :small "m1.small" :cpu-medium "c1.medium" :medium "m1.medium" :large "m1.large"}) | |
(def ubuntu-app-server | |
(pallet.core/node-spec | |
:image {:os-family :ubuntu} |
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
(defpallet | |
;; you can specify global data in the :environment key here | |
;; | |
:environment { | |
:algorithms | |
{:lift-fn pallet.core/parallel-lift | |
:converge-fn | |
pallet.core/parallel-adjust-node-counts}} | |
:admin-user | |
{:username "ubuntu" |
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
(use 'nio2.watch) | |
(use 'nio2.io) | |
(doseq [ev (watch-seq (path "/" "home" "murtaza" "tmp") :create :modify :delete)] | |
(println [(ev :path) (ev :kind)])) |
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 sample.core | |
(:require [clojure.core.reducers :as r] | |
[criterium.core :as cc :refer [bench quick-bench]])) | |
;; core/map without transducers | |
(quick-bench (doall (->> [1 2 3 4] | |
(map inc) | |
(map inc) | |
(map inc)))) |
OlderNewer