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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Fullscreen Image Viewer</title> | |
<style> | |
body { | |
font-family: Arial, sans-serif; | |
} |
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
// needs ramda.js | |
const enclose = curry((a, obj) => objOf(prop(a, obj))(obj)) | |
var example = {'id': '123', 'foo': 'bar'}; | |
enclose('id', example) | |
// {"123": {"foo": "bar", "id": "123"}} |
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
#lang racket/base | |
; One way to define a logger | |
(define lg (make-logger 'my-logger)) | |
; Define a receiver for this logger, along with a log level | |
(define rc (make-log-receiver lg 'error)) ; also try with 'debug | |
; Another way to define a logger, with additional forms | |
(define-logger lg2) | |
(define rc2 (make-log-receiver lg2-logger 'debug)) |
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
#lang racket/base | |
(require json | |
lens | |
net/url | |
net/url-string | |
net/head | |
racket/dict | |
racket/string) |
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
#lang racket/base | |
(require racket/format | |
racket/list | |
racket/match | |
racket/trace) | |
(provide (all-defined-out) | |
(all-from-out racket/trace)) |
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)) |
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
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
{ | |
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
# Version key/value should be on his own line | |
PACKAGE_VERSION=$(cat package.json \ | |
| grep version \ | |
| head -1 \ | |
| awk -F: '{ print $2 }' \ | |
| sed 's/[",]//g') | |
echo $PACKAGE_VERSION |
NewerOlder