Skip to content

Instantly share code, notes, and snippets.

;; a compare function that will compare two Logseq block hash maps using "eric" logic
;;
;; sort by:
;; - NOW, DOING, ...
;; - A, B, NO PRIORITY, C
;; - Journal day (a journal page is "lower" than a page that is not a journal)
;;
;; You can run this script which will run through some test cases
(def compare-block
{
"$id": "http://3d.adobe.com/schemas/sensei/poc/v1/subject.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Message string"
}
},
{
"$id": "http://3d.adobe.com/schemas/sensei/poc/v1/subject.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of the subject"
}
},
@webmonarch
webmonarch / keybase.md
Created August 16, 2016 05:05
keybase.md

Keybase proof

I hereby claim:

  • I am webmonarch on github.
  • I am ericwebb (https://keybase.io/ericwebb) on keybase.
  • I have a public key ASAl9HPLwyVBTNNgKnBMTRr_sPkUalyMIoAJ6_VnobmNAAo

To claim this, I am signing this object:

This is a Test!

Of the emergency broadcast system.

# this is only a test!
@webmonarch
webmonarch / rails-bootstrap-template.rb
Last active January 2, 2016 17:39
Rails 4.0 application template that sets up: * rspec-rails * bootstrap-sass * some boilerplate layout stuff * meta tags * move javascript include to `</body>` * Create Welcome controller and default `app/views/welcome/index.html.erb`
#
# Experiment with Rails Application Generation Templates
#
# This template sets up:
# * rpsec-rails gem (with capybara)
# * bootstrap-sass gem
# * Integrates bootstrap-sass into application.css and application.js
# * Re-arranges application.html.erb layout
# * adds compatibility meta header
# * moves application.js from <head> to </body>
@webmonarch
webmonarch / seed.rb
Created November 25, 2012 03:52
Devise + RefineryCMS Setup Scripts
u = User.create!({ :email => "eric@example.com", :password => "example" })
ad = Role["Superuser"]
rf = Role["Refinery"]
u.roles << ad
u.roles << rf
var paper = new Raphael(document.body, 400, 300); // create the Raphael drawing area (paper)
var d3_paper = d3.raphael(paper); // Create the d3 selection that operates on the Raphael drawing area (paper)
@webmonarch
webmonarch / area-d3-raphael-example.html.diff
Created May 2, 2012 05:10
area-d3-raphael-example.html.diff
--- area.html 2012-05-01 19:55:06.396469296 -0700
+++ area-raphael.html 2012-05-01 19:55:06.396469296 -0700
@@ -13,7 +13,8 @@
}
.area {
- fill: lightsteelblue;
+ stroke: none;
+ fill: lightsteelblue;
}
@webmonarch
webmonarch / area-d3-raphael-example.html
Created May 2, 2012 05:06
area-d3-raphael-example.html
<!DOCTYPE html>
<!-- From https://github.com/webmonarch/d3/tree/raphael-compat/examples/area -->
<meta charset="utf-8">
<style>
body {
font: 10px sans-serif;
}