Skip to content

Instantly share code, notes, and snippets.

View RichMorin's full-sized avatar

Rich Morin RichMorin

  • Canta Forda Computer Laboratory
  • Marysville, WA, USA
View GitHub Profile
@RichMorin
RichMorin / demo.css
Created March 19, 2012 16:20
Hive Plot Demo Rework
/* demo.css */
.axis {
stroke: #000;
stroke-width: 1.5px;
}
#demo_1 svg, #demo_2 svg { border: solid 1px #ccc; }
# I've been geting irb nastygrams for a while, but given that I just updated
# my copy of Ruby and all the Gems, I was hoping that it would go away. Help?
$ irb
Ignoring libxml-ruby-2.7.0 because its extensions are not built.
Try: gem pristine libxml-ruby-2.7.0
Ignoring sqlite3-1.3.9 because its extensions are not built.
Try: gem pristine sqlite3-1.3.9
$ gem pristine libxml-ruby-2.7.0
@RichMorin
RichMorin / erb_nl_nit
Created January 2, 2017 02:08
demonstrate newline-handling nit
#!/usr/bin/env ruby
#
# erb_nl_nit - minimal example of Embedded Ruby newline nit
#
# The Embedded Ruby implementation for Sinatra removes (some) newlines.
# Basically, if an interpolated string is on a line by itself (no text
# either before or after), the newline goes away. The Ruby ERB library
# does not exhibit this problem.
#
# The input and results are displayed on STDOUT and the output web page.
@RichMorin
RichMorin / gist:cebe6dbeede9fdee6aa29d5182aa6f56
Last active July 13, 2016 01:02
failing run of "mix compile" for Nerves
$ mix compile
Nerves Precompile Start
Nerves Env current
Nerves Env loaded
Nerves Precompile End
===> Command bare not found
** (Mix) Could not compile dependency :cf, "/usr/local/bin/rebar3 bare compile --paths "/Volumes/Fido/Local/u/rdm/Dropbox/Elixir/hello_nerves/_build/rpi2/dev/lib/*/ebin"" command failed. You can recompile this dependency with "mix deps.compile cf", update it with "mix deps.update cf" or clean it with "mix deps.clean cf"
Per jschneck, tried:
@RichMorin
RichMorin / MBTI_3.json
Last active December 14, 2015 17:49
Treemap of MBTI statistics
{ "title": "MBTI_3.json",
"name": "MBTI",
"children": [
{
"name": "E",
"children": [
{
"name": "EN",
"children": [
The following entries describe the content of the heading row
and the first data row in each CSV file.
axis "../data/stocks.csv"
symbol S&P 500
date Jan 2000
price 1394.46
{
"YARD": {
"attributes": {"instance":{},"class":{}},
"children": ["YARD::VERSION","YARD::ROOT","YARD::TEMPLATE_ROOT","YARD::CONFIG_DIR","YARD.parse","YARD.parse_string","YARD.load_plugins","YARD::Config","YARD::Server","YARD::CLI","YARD::Logger","YARD::Options","YARD::Registry","YARD::CodeObjects","YARD::Handlers","YARD::I18n","YARD::Parser","YARD::Rake","YARD::Serializers","YARD::Tags","YARD::Templates","YARD::Verifier","YARD::Docstring","YARD::RegistryStore","YARD::DocstringParser","YARD::StubProxy"],
"docstring": "",
"files": [["lib/yard.rb",1],["lib/yard/config.rb",1],["lib/yard/server.rb",1],["lib/yard/cli/yri.rb",3],["lib/yard/logging.rb",3],["lib/yard/options.rb",1],["lib/yard/cli/i18n.rb",3],["lib/yard/cli/help.rb",1],["lib/yard/cli/gems.rb",1],["lib/yard/cli/list.rb",1],["lib/yard/cli/diff.rb",5],["lib/yard/registry.rb",4],["lib/yard/autoload.rb",4],["lib/yard/tags/tag.rb",1],["lib/yar
@RichMorin
RichMorin / x.out
Created May 15, 2012 19:28
YARD Registry Dumper
# file_path: "yard/.yardoc"
# options: {:types=>[:namespace, :method], :levels=>2}
# node_path: "YARD"
{
"@context": {
"type": "@type",
"y_ld": "http://sparqly.cfcl.com/y_ld/",
"yard": "http://sparqly.cfcl.com/yard/",
/**
* CoffeeScript Compiler v1.2.0
* http://coffeescript.org
*
* Copyright 2011, Jeremy Ashkenas
* Released under the MIT License
*/
(function(root){var CoffeeScript=function(){function require(a){return require[a]}require["./helpers"]=new function(){var a=this;(function(){var b,c;a.starts=function(a,b,c){return b===a.substr(c,b.length)},a.ends=function(a,b,c){var d;d=b.length;return b===a.substr(a.length-d-(c||0),d)},a.compact=function(a){var b,c,d,e;e=[];for(c=0,d=a.length;c<d;c++)b=a[c],b&&e.push(b);return e},a.count=function(a,b){var c,d;c=d=0;if(!b.length)return 1/0;while(d=1+a.indexOf(b,d))c++;return c},a.merge=function(a,c){return b(b({},a),c)},b=a.extend=function(a,b){var c,d;for(c in b)d=b[c],a[c]=d;return a},a.flatten=c=function(a){var b,d,e,f;d=[];for(e=0,f=a.length;e<f;e++)b=a[e],b instanceof Array?d=d.concat(c(b)):d.push(b);return d},a.del=function(a,b){var c;c=a[b],delete a[b];return c},a.last=function(a,b){return a[a.length-(b||0)-1]}}).call(this)},require["./rewriter"]=new function(){var
@RichMorin
RichMorin / demo.css
Created March 10, 2012 03:53
Selectable Projection Demo
/* demo.css */
body {
margin: 5px auto;
}
#chart svg {
border: solid 1px #ccc;
}