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
{ | |
function getType(def, head) { | |
switch (head) { | |
case "and": | |
case "or": | |
case "not": | |
return "booleanOperator"; | |
case "eq": | |
case "ne": |
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
traceroute to 216.81.59.173 (216.81.59.173), 64 hops max, 52 byte packets | |
1 10.0.1.1 (10.0.1.1) 2.586 ms 2.537 ms 2.488 ms | |
2 cpe-24-193-64-1.nyc.res.rr.com (24.193.64.1) 39.531 ms 40.378 ms 29.598 ms | |
3 tenge-0-1-0-1-nycmnyr-rtr02.nyc.rr.com (24.168.135.197) 16.053 ms 14.207 ms 12.974 ms | |
4 bun120.nyquny91-rtr001.nyc.rr.com (184.152.112.151) 24.183 ms 26.115 ms 21.825 ms | |
5 bun6-nyquny91-rtr002.nyc.rr.com (24.29.148.254) 22.984 ms 18.966 ms 17.828 ms | |
6 107.14.19.22 (107.14.19.22) 20.939 ms 30.737 ms 24.894 ms | |
7 ae-0-0.pr0.nyc20.tbone.rr.com (66.109.6.157) 20.862 ms 19.818 ms 19.913 ms | |
8 te7-4.ar1.nyc8.gblx.net (208.48.23.1) 22.280 ms | |
tengigabitethernet3-3.ar7.nyc1.gblx.net (64.213.104.193) 20.512 ms 15.321 ms |
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
car = (arr) -> | |
arr[0] | |
cdr = (arr) -> | |
arr[1..] | |
# Using for loop | |
map = (arr, func) -> | |
func(r) for r in arr |
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
<div id="canvas"> | |
<h1>Click and drag boxes</h1> | |
<ul> | |
<li class="box"></li> | |
<li class="box"></li> | |
<li class="box"></li> | |
</ul> | |
</div> |
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 DarrenN.dom.test | |
(:require [cljs.core.async :refer (<! >! chan put! take! alts! timeout close! dropping-buffer sliding-buffer)] | |
[domina :as dom] | |
[domina.events :as events] | |
[domina.css :as css] | |
[hiccups.runtime :as hiccupsrt]) | |
(:require-macros [cljs.core.async.macros :refer (go alt!)] | |
[hiccups.core :as hiccups])) | |
(defn make-style [] |
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 DarrenN.stateless.buffer) | |
;; create-buffer returns a vector scoped to size. When new items are added | |
;; they are passed to functions in add-listeners. If the vector is at its | |
;; size limit then items are shifted off the front of the vector and | |
;; passed to the functions in destroy-listeners | |
;; Callbacks for adding/removing item from vector | |
(def destroy-listeners [(fn [i] (print (str i " removed")))]) | |
(def add-listeners [(fn [i] (print (str i " added")))]) |
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 buffers.core | |
(:require | |
[cljs.core.async :refer (<! >! chan put! take! alts! timeout close! dropping-buffer sliding-buffer)] | |
[domina :as dom] | |
[domina.css :as css] | |
[domina.events :as ev] | |
[hiccups.runtime :as hiccupsrt]) | |
(:require-macros | |
[cljs.core.async.macros :refer (go alt!)] | |
[hiccups.core :as hiccups])) |
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
syntax where = function(ctx) { | |
const binaryOps = ["or", "and", "==", ">", "<", "-", "+", "*", "/", "."]; | |
const dummy = #`dummy`.get(0); | |
function matchNext(names) { | |
const marker = ctx.mark(); | |
const next = ctx.next(); | |
ctx.reset(marker); | |
return !next.done && names.includes(next.value.val()); | |
} |
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
// Success 2xx | |
export const HTTP_200_OK = 200; | |
export const HTTP_201_CREATED = 201; | |
export const HTTP_202_ACCEPTED = 202; | |
export const HTTP_203_NON_AUTHORITATIVE_INFORMATION = 203; | |
export const HTTP_204_NO_CONTENT = 204; | |
export const HTTP_205_RESET_CONTENT = 205; | |
export const HTTP_206_PARTIAL_CONTENT = 206; | |
export const HTTP_207_MULTI_STATUS = 207; |
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
(defun dotspacemacs/user-init () | |
;; Use whatever node is available | |
(setq node-path (mapconcat | |
'identity | |
(butlast (split-string (executable-find "node") "\\/")) "/")) | |
(add-to-list 'exec-path node-path t)) |