Validate JSON Schema documents with Org mode
- Validate JSON literals
#+NAME: org-src-json-schema-literals #+BEGIN_SRC shell :results pp curl -s https://assertible.com/json -d '{ "schema": {}, "json": {} }' | jq .
#!/usr/bin/env stack | |
-- stack -v runghc --package connection --package http-client --package http-client-tls --package tls --package data-default | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE ViewPatterns #-} | |
{-# OPTIONS_GHC -fno-warn-deprecations #-} | |
import qualified Network.Connection as NC | |
import qualified Network.HTTP.Client as Http | |
import qualified Network.HTTP.Client.TLS as Http | |
import qualified Network.TLS as TLS |
version: 2 | |
workflows: | |
version: 2 | |
build-and-test: | |
jobs: | |
- build | |
- build-nightly | |
- build-lts-11 |
Validate JSON Schema documents with Org mode
#+NAME: org-src-json-schema-literals
#+BEGIN_SRC shell :results pp
curl -s https://assertible.com/json -d '{
"schema": {},
"json": {}
}' | jq .
" minimal cvim - see the cvim.css file for customizing theme | |
" | |
" https://gist.github.com/creichert/31914a6dc517b22f4a21777c463ab4ff | |
set autoupdategist | |
let hintcharacters = 'asdfghjklcvbn' | |
let barposition = "bottom" | |
let searchalias s = "stackoverflow" | |
let searchalias g = "google" |
# Gmail checker for Xmobar | |
# | |
# Install the ruby-gmail and mime gem to system | |
# Put the script under ~/path/to/gmail_checker.rb | |
# Make sure it is executable | |
require 'gmail' | |
gmail = Gmail.new('example@gmail.com', 'password') | |
mail_count = gmail.inbox.count(:unread) |
Note: everything here is pretty specific to my usage/accounts and not written for public use... You'll probably have to tweak a bunch of stuff.
$ bean-extract config.py ~/Downloads # the csvs should be in here
WM_STATE(WM_STATE): | |
window state: Normal | |
icon window: 0x0 | |
_NET_WM_USER_TIME(CARDINAL) = 86660406 | |
WM_NORMAL_HINTS(WM_SIZE_HINTS): | |
program specified location: 1, 19 | |
program specified minimum size: 1 by 1 | |
WM_NAME(UTF8_STRING) = "Page not found · GitHub" | |
_NET_WM_NAME(UTF8_STRING) = "Page not found · GitHub" | |
XdndAware(ATOM) = BITMAP |
;; see my config for the other parts: | |
;; | |
;; https://github.com/creichert/dotfiles/blob/master/emacs/.gnus | |
;; | |
;; I typically put the below settings into a file called `gnus-private.el`, | |
;; and require that into my gnus to populate these settings. | |
;; | |
;; https://github.com/creichert/dotfiles/blob/master/emacs/.gnus#L61 |
(defmacro template (text) | |
"Expand text like \"Hello <<name>>\" to (format \"Hello %s\" name)." | |
(let ((pattern "<<\\(.*?\\)>>")) | |
;; The regexp matches anything between delimiters, non-greedily | |
(with-temp-buffer | |
(save-excursion (insert text)) | |
(let ((matches '())) | |
(while (re-search-forward pattern nil t) | |
(push (match-string 1) matches) | |
(replace-match "%s" t t)) |
conf_layout: | |
lconfig_altChooser: | |
tag: AltChooserBoundedSearch | |
contents: 3 | |
lconfig_importColumn: 50 | |
lconfig_hangingTypeSignature: true | |
lconfig_alignmentLimit: 30 | |
lconfig_indentListSpecial: true | |
lconfig_indentAmount: 4 | |
lconfig_alignmentBreakOnMultiline: true |