Skip to content

Instantly share code, notes, and snippets.

View mcwhittemore's full-sized avatar

Matthew Chase Whittemore mcwhittemore

  • Till
  • Yarmouth, ME
View GitHub Profile
@mcwhittemore
mcwhittemore / 3.md
Created June 10, 2015 13:02
Tasting Notes from 321 Club Gatherings

Meeting 3: Going Deeper on Rye

This month we decided to go deeper on rye as we have enjoyed the Bulleit Rye over the last few months.

Bulleit Rye

  • MCW: Smooth
  • Rami: Warm and Fruity
  • Jared: Caramel, vanilla finish, medium burn
  • Sijie: Less burn than the non rye options we've had
javascript:(function(){var imported=document.createElement('script');imported.src="http://bit.ly/WGgtMN";document.head.appendChild(imported);})();
  • Title view Only
  • Order in large view
  • Share?
  • Move tasks from one list to another list.
var http = require('http');
var simserver = http.createServer(function (req, res) {
//console.log('req.url:', req.url);
res.writeHead(200, {'Content-Type': 'text/plain'});
var count = 10;
var timerId = setInterval(function() {
console.log('request count:', count);
count = count -1;
if (count > 0) {
@mcwhittemore
mcwhittemore / db-migrate-stats.js
Created April 15, 2014 12:29
stats about your migrations
var migrations = [/* to be filled with paths to node-db-migrate modules */]
var total = migrations.length;
var ups = 0;
var downs = 0;
var upMTO = 0;
var downMTO = 0;
var uu = [];
var contentBox = $(".box")[0];
if(contentBox==undefined){
throw new Error("Can't find paste element");
}
else{
var $content = $(contentBox);
var header = $content.find(".box-header")[0];
header.innerHTML = "<h3 style='text-align: center;'>Comments</h3>";
setstsest
@mcwhittemore
mcwhittemore / README.md
Last active January 3, 2016 00:09
# Enitre - Module Access to Entire Core via the `entire_api`

Enitre - Module Access to Entire Core

One of the questions I've been struggling with is how entire_modules access entire_core. I think a lot of the struggle with understand this is coming from a lack of simply defining terms.

Terms

The entire_core is a unit of koa middleware designed to allow developers to build features for a website in the same way as they build modules for node. It does this by exposing an api to entire_modules.

An entire_module is a node_module designed in such a way that it when run by the entire_core it can 1) consume an api, 2) expose client side javascript 3) expose css 4) expose views and 5) expose public content such as images.

Entire - module dependencies

Today @danmactough raised a question about entire_module dependencies vs node_modules dependencies. In general I'm thinking of Entire as extending the node_module system to the browser, but I had kept entire_modules different from node_modules because it is easier to know what should be in the koa stack if its in a folder just for it. Obviously, this is not a good enough reason.

A proposed change

Included in this gist are three files. Two entire_module package.json files, saved in some likely named folder in the node_modules folder and a standard node_module package.json file, defining the dependencies of my first entire app.

Reasons for this change

var rows = document.querySelectorAll(".row a");
var find = "USER-NAME";
for(var i=0; i<rows.length; i++){
if(rows[i].innerText==find){
console.log(i+1, rows[i]);
break;
}
}