Skip to content

Instantly share code, notes, and snippets.

View grantmichaels's full-sized avatar

grantmichaels grantmichaels

View GitHub Profile
@tommck
tommck / ZymaticCleaning.md
Last active March 7, 2017 21:12
Zymatic Cleaning Instructions

Zymatic Cleaning Instructions

This information has been cobbled together from communications with the PicoBrew folks.

For some reason, the information they give publicly on their website and information in forums and private emails differs.

In lieu of them publishing a comprehensive cleaning guide, I have assembled this here.

Rinses

Run a rinse before and after each brew. These should be at least 2 gallons ran from one vessel to another but should be more during the post brew if it has not run clear yet. Hot water is best.

@candera
candera / ssh-repl.org
Last active February 9, 2019 07:50
ssh-repl

Embedding an SSH-accessible REPL in a Clojure process

N.B. This is now a library, thanks to the efforts of the wonderful @mtnygard. And the README does a good job of making clear just how terrible an idea it is to actually do this. :)

As any Clojurist knows, the REPL is an incredibly handy development tool. It can also be useful as a tool for debugging running programs. Of course, this raises the question of how to limit access to the REPL to authorized parties. With the Apache SSHD library, you can embed an SSH server in any JVM process. It takes only a little code to hook this up to a REPL, and to limit access either by public key or

@swannodette
swannodette / om_data.cljs
Last active January 9, 2021 16:09
Om + DataScript
(ns om-data.core
(:require [om.core :as om :include-macros true]
[om.dom :as dom :include-macros true]
[datascript :as d]))
(enable-console-print!)
(def schema {})
(def conn (d/create-conn schema))
@karmi
karmi / d3.js
Last active April 18, 2016 06:13
A D3.js Tutorial: Bar Chart
!function() {
var d3 = {
version: "3.4.11"
};
if (!Date.now) Date.now = function() {
return +new Date();
};
var d3_arraySlice = [].slice, d3_array = function(list) {
return d3_arraySlice.call(list);
};
var phantom_sync = require('phantom-sync');
var phantom = phantom_sync.phantom;
var sync = phantom_sync.sync;
var cheerio = require('cheerio');
sync(function() {
var ph = phantom.create();
page = ph.createPage();
// ページが読み込まれたら page.onCallback を呼ぶ
@anthonyringoet
anthonyringoet / request.js
Created December 27, 2012 13:15
scraping data from the dom with node
var request = require('superagent');
var _ = require('lodash');
var cheerio = require('cheerio');
request.get('http://news.ycombinator.com/', function (res){
var html = res.text,
$ = cheerio.load(html),
index = 1;
var items = $('.title a');
@jdpaton
jdpaton / n4watcher.js
Created November 27, 2012 08:31
Nexus 4 watcher ... email alerts version
var email = require('emailjs');
var cheerio = require('cheerio');
var request = require('request');
var url8GB = 'https://play.google.com/store/devices/details?id=nexus_4_8gb';
var url16GB = 'https://play.google.com/store/devices/details?id=nexus_4_16gb';
var defaultState = 'UNKNOWN';
var trackingState8GB = defaultState;
var trackingState16GB = defaultState;
@gotomypc
gotomypc / index.coffee
Created October 28, 2012 15:58 — forked from lancejpollard/index.coffee
Scrape Periodic Table of Elements from Wikipedia in Node.js
# http://www.webelements.com/aluminium/
# http://environmentalchemistry.com/yogi/periodic/Al.html
# http://www.chemicool.com/elements/aluminum.html
parseWikipediaTableOfElements = ->
urls = []
$("#mw-content-text table tr td[title] a").each ->
urls.push($(this).attr('href'))
urls
@gotomypc
gotomypc / gist:3968033
Created October 28, 2012 08:11 — forked from mrjjwright/gist:3240020
Extract largest image thumbnail from url using node and cheerio
cheerio = require('cheerio')
Shred = require('shred')
shred = new Shred()
http = require('http')
URL = require('url')
server = http.createServer (request, response) ->
url = URL.parse(request.url, true)
urlToDiscover = url.query['url']
startDiscovery urlToDiscover, (theImageURL) ->
@gotomypc
gotomypc / gist:3967534
Created October 28, 2012 04:37 — forked from yuanchuan/gist:3232510
download pages with nodejs
var fs = require('fs')
, http = require('http')
, path = require('path')
, cheerio = require('cheerio');
var archive = 'http://apod.nasa.gov/apod/archivepix.html'
, base = path.dirname(archive) + '/'
, target = 'archive/english/';