Skip to content

Instantly share code, notes, and snippets.

View ryaninvents's full-sized avatar

Ryan Kennedy ryaninvents

View GitHub Profile
@ryaninvents
ryaninvents / couch-cors.sh
Last active August 29, 2015 14:17
PouchDB CORS setup
if [ -z "$COUCH_HOST" ]; then
echo "Need to set COUCH_HOST"
exit 1
fi
curl -X PUT $COUCH_HOST/_config/httpd/enable_cors -d '"true"'
curl -X PUT $COUCH_HOST/_config/cors/origins -d '"*"'
curl -X PUT $COUCH_HOST/_config/cors/credentials -d '"true"'
curl -X PUT $COUCH_HOST/_config/cors/methods -d '"GET, PUT, POST, HEAD, DELETE"'
curl -X PUT $COUCH_HOST/_config/cors/headers -d '"accept, authorization, content-type, origin, referer, x-csrf-token"'
@ryaninvents
ryaninvents / README.md
Last active August 29, 2015 14:16
Build your own graphing calculator
@ryaninvents
ryaninvents / README.md
Last active August 29, 2015 14:16
DOT diagram for calibration flow

This messy graph represents the high-level workflow for calibrating a Rostock-style delta 3D printer.

@ryaninvents
ryaninvents / index.html
Last active August 29, 2015 14:16
Script injector
<a href="javascript:(function()%7Bfunction%20callback()%7B(function()%7B%7D)()%7Dvar%20s%3Ddocument.createElement(%22script%22)%3Bs.src%3D%22https%3A%2F%2Fgist.githack.com%2Fbaconscript%2F835d1c57cffd21eca7ba%2Fraw%2Ff9e4453a1b39504030b1590bfa481444706b6475%2Finject.js%22%3Bif(s.addEventListener)%7Bs.addEventListener(%22load%22%2Ccallback%2Cfalse)%7Delse%20if(s.readyState)%7Bs.onreadystatechange%3Dcallback%7Ddocument.body.appendChild(s)%3B%7D)()">Add scripts</a>
@ryaninvents
ryaninvents / README.md
Last active August 29, 2015 14:15
Webcomponents with events!

Creating WebComponents with custom events, via the EventEmitter library (and using lodash to assign to the prototype).

@ryaninvents
ryaninvents / links.md
Last active August 29, 2015 14:11
BackboneConf talk links
@ryaninvents
ryaninvents / keybase.md
Last active August 29, 2015 14:10
keybase.md

Keybase proof

I hereby claim:

  • I am r24y on github.
  • I am r24y (https://keybase.io/r24y) on keybase.
  • I have a public key whose fingerprint is 7FDE 6EAA E22B 9594 0977 52A9 40DB B081 15CE D8F0

To claim this, I am signing this object:

@ryaninvents
ryaninvents / Dockerfile
Last active August 29, 2015 14:10
Softcover Dockerfile
FROM ubuntu:14.04
RUN apt-get update && apt-get install -y software-properties-common curl
RUN apt-add-repository ppa:brightbox/ruby-ng
RUN curl -sL https://deb.nodesource.com/setup | sudo bash -
RUN apt-get update && apt-get -y upgrade
RUN curl -sL http://kindlegen.s3.amazonaws.com/kindlegen_linux_2.6_i386_v2_9.tar.gz > kindlegen.tgz
RUN curl -sL https://github.com/IDPF/epubcheck/releases/download/v3.0/epubcheck-3.0.zip > epubcheck.tgz
RUN apt-get install -y ruby2.1 ruby-switch texlive imagemagick nodejs inkscape calibre default-jre
RUN cd /tmp