Skip to content

Instantly share code, notes, and snippets.

View dckc's full-sized avatar

Dan Connolly dckc

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title>ETA Config</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css" />
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>
</head>
@dckc
dckc / log.txt
Created January 5, 2015 23:01
logging unicode error
2015-01-05 16:01:13,885 INFO getting patient data for patient set 64969
Traceback (most recent call last):
File "/usr/local/heron_extract/cdr2edc/dfbuilder.py", line 1033, in <module>
_trusted_main()
File "/usr/local/heron_extract/cdr2edc/dfbuilder.py", line 1031, in _trusted_main
gethostname=socket.gethostname)
File "/usr/local/heron_extract/cdr2edc/dfbuilder.py", line 951, in main
params['label'], concepts, filename, patient_set)
File "/usr/local/heron_extract/cdr2edc/dfbuilder.py", line 801, in __call__
out = dest.export(job)
@dckc
dckc / atom-eval.md
Created May 28, 2015 02:07
an emacs addict tries Atom

title: an emacs addict tries Atom

can I shell out?

I don't see how.

These drop-down menus while I'm just typing prose are kinda annoying.

Why did it open a new window when I opened my meteor1 folder?

download, installation: nice

meteor create works fine... not a lot of gorp in my project directory. hmm... what's this .meteor stuff?

ugh: global state:

Session.setDefault('counter', 0);

@dckc
dckc / hide.js
Created June 9, 2015 19:33
jsSHA default export and flow
/* @flow */
import jsSHA from 'jssha';
export function mkHideLines(getSecret: () => string) : (pt: string) => string {
return plainText => {
var secret = getSecret();
return plainText
.split("\n")
.map(line => hmac(line, secret))
.join("\n");
@dckc
dckc / js-quality-security.md
Created June 11, 2015 05:47
modern js blog draft

title: On Modern JavaScript published: false date: 2015-03-25 tags: [javascript, web, programming, security, quality]

@@flycheck-mode, emacs, atom, IntelliJ

@@BE on latent static types... and flowtype

@dckc
dckc / macbook-wipe.md
Last active August 29, 2015 14:22
airbook mind-wipe

see also bookmarks on long wait at 0 seconds on progress bar

connect to wifi? when in rome likewise Sign in with Your Apple ID

Find My Mac? pass.

(pass) Use my iCloud account to log in

@dckc
dckc / log1.md
Last active August 29, 2015 14:24
iPhoto to flickr via Yosemite

Yay! https://github.com/jawj/iphoto-flickr is uploading a 30GB iPhoto library, uploading to flickr, where they offer that tasty 1TB of storage, along with nice curation and navigation features:

  • by date taken
  • by place on map
  • by tag

The docs say iphoto-flickr preserves albums. I wonder about mapping events to photosets.

It finds the default library. I guess using Applescript.

The default library is on an external USB drive, in an encrypted sparsebundle.

@dckc
dckc / monte_syntax.html
Last active August 29, 2015 14:25
monte railroad diagrams
<!doctype html><title>Test</title><style>svg.railroad-diagram{background-color:hsl(30,20%,95%);}svg.railroad-diagram path{stroke-width:3;stroke:black;fill:rgba(0,0,0,0);}svg.railroad-diagram text{font:bold 14px monospace;text-anchor:middle;}svg.railroad-diagram text.label{text-anchor:start;}svg.railroad-diagram text.comment{font:italic 12px monospace;}svg.railroad-diagram rect{stroke-width:3;stroke:black;fill:hsl(120,100%,90%);}</style><h1>module</h1>
<svg class="railroad-diagram" height="82" viewBox="0 0 493 82" width="493">
<g transform="translate(.5 .5)">
<path d="M 20 41 v 20 m 10 -20 v 20 m -10 -10 h 20.5">
</path><g>
<path d="M40 51h0">
</path><path d="M452 51h0">
</path><g>
<path d="M40 51h0">
</path><path d="M380 51h0">
@dckc
dckc / web1.mt
Created July 28, 2015 23:16
monte web server example
def [=> UTF8] | _ := import("lib/codec/utf8")
def [=> makeHTTPEndpoint] | _ := import("lib/http/server")
def [=> tag] | _ := import("lib/http/tag")
def simplePage(content):
escape badBody:
def body := UTF8.encode(content, badBody)
def headers := [
"Connection" => "close",