Skip to content

Instantly share code, notes, and snippets.

Uday Verma verma

Block or report user

Report or block verma

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View server.clj
(ns karmalack.server
(:require [karmalack.config :refer [slack-conn-config dev?]]
[karmalack.db :as db]
[compojure.core :refer :all]
[liberator.core :refer [defresource resource]]
[clj-slack.core :as slack]
[org.httpkit.server :refer [run-server]]
[com.stuartsierra.component :as component]
[ring.middleware.cors :refer [wrap-cors]]
[ring.middleware.reload :refer [wrap-reload]]
View single-line-input.cljs
(defn- -single-line-input [value on-key placeholder]
(fn [value on-key placeholder]
[:input.form-control.input-lg {:type "text"
:value @value
:on-key-down on-key
:on-change #(reset! value (.. % -target -value))
:placeholder placeholder
:autoFocus true}]))
(defn- single-line-input [value on-key placeholder]
View fix-it-up.el
;; input lines are like:
;; fs.truncate(path, len, callback)
;; fs.truncateSync(path, len)
;; fs.chown(path, uid, gid, callback)
;; fs.chownSync(path, uid, gid)
;; which are converted to:
;; (def ftruncate (core/clojureify fs.ftruncate))
;; (def ftruncate-sync (core/clojureify-sync fs.ftruncateSync))
;; ...
View clojureify.clj
(ns node-tests.core
(:refer-clojure :exclude [exists?])
(:require [cljs.nodejs :as nodejs]
[cljs.core.async :as async :refer [<!]])
(:require-macros [cljs.core.async.macros :refer [go]]))
(nodejs/enable-util-print!)
;; Some helpers which help transform node style functions into clojurey ones
;;
View whatisgoingon.clj
(ns node-tests.core
(:require [cljs.nodejs :as nodejs]
[cljs.core.async :as async :refer [<!]])
(:require-macros [cljs.core.async.macros :refer [go]]))
(nodejs/enable-util-print!)
(defn clojureify [f]
(fn [] (js/console.log f)))
View .vimrc
" Enable syntax highlighting
" and apply our nice color theme
"
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
View default-args.js
GreyhoundReader.prototype.readIndexed = function(sessionId, bbox, schema, depthBegin, depthEnd, cb) {
var options = {
schema: (schema || Schema.standard()),
};
if (typeof(bbox) === 'function') {
cb = bbox;
bbox = schema = depthBegin = depthEnd = null;
}
View renderer.cljs
Compiling "target/dev/renderer.js" failed.
clojure.lang.ExceptionInfo: failed compiling file:src/renderer/core.cljs
core.clj:4403 clojure.core/ex-info
compiler.clj:1029 cljs.compiler/compile-file
compiler.clj:1082 cljs.compiler/compile-root
closure.clj:341 cljs.closure/compile-dir
closure.clj:381 cljs.closure/eval2986[fn]
closure.clj:292 cljs.closure/eval2923[fn]
closure.clj:395 cljs.closure/eval2973[fn]
closure.clj:292 cljs.closure/eval2923[fn]
View weasel-error.txt
user=> (require 'weasel.repl.websocket)
nil
user=> (cemerick.piggieback/cljs-repl
#_=> :repl-env (weasel.repl.websocket/repl-env
#_=> :ip "0.0.0.0" :port 9001))
WARNING: Symbol event/EventType is not a protocol at line 25 file:/Users/verma/.m2/repository/weasel/weasel/0.3.0/weasel-0.3.0.jar!/weasel/impls/websocket.cljs
WARNING: Symbol event/EventType is not a protocol at line 25 out/weasel/impls/websocket.cljs
UnsupportedOperationException count not supported on this type: Symbol clojure.lang.RT.countFrom (RT.java:556)
user=>
@verma
verma / .vimrc
Last active Apr 19, 2016
Most recent .vimrc
View .vimrc
" Enable syntax highlighting
" and apply our nice color theme
"
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
You can’t perform that action at this time.