Skip to content

Instantly share code, notes, and snippets.

View ckkashyap's full-sized avatar

Kashyap ckkashyap

  • Redmond, Washington, USA
View GitHub Profile
@ckkashyap
ckkashyap / Churaliya.rb
Created October 28, 2023 17:40
Churaliya Hai Tumne Jo Dil ko
use_bpm 80
live_loop :metro do
sample :drum_heavy_kick
sleep 1
end
define :introStrumAsus2b6 do
play :e4, release: 0.5
sleep 0.1
(load "@lib/http.l" "@lib/xhtml.l" "@lib/form.l")
(class +Task +Entity)
(rel nr (+Need +Key +Number))
(rel ttl (+IdxFold +String))
(rel sts (+Sn +IdxFold +String))
(rel tgs (+Sn +IdxFold +String))
(rel dt (+Need +Ref +Date))
(rel upds (+List +Joint) tsk (+Update))
(de parse-json ()
(skip)
(case (peek)
("\"" (read-string))
("{" (read-object))
("[" (read-array))
("t" (read-bare-word "true"))
("f" (read-bare-word "false"))
("n" (read-bare-word "null"))
(T (read-number))))
@ckkashyap
ckkashyap / protocol.cljs
Created November 12, 2018 13:33
protocol demo
(ns protocol
(:require-macros [cljs.core.async.macros :refer [go go-loop]])
(:require
[goog.net.XhrIo :as xhr]
[goog.json :as gjson]
[cljs.core.async :as async :refer [chan close! <! >!]]))
(defn do-request [endpoint method headers body]
(let [ch (chan)]
(xhr/send endpoint