Do whatever you want with this code. I offer it without expectation or warranty. No need to credit me in your project or source code. A digital high five would be nice, but is not required.
@interface StoreViewControllerTest : XCTestCase | |
@end | |
@implementation StoreViewControllerTest { | |
NSManagedObjectContext* _moc; | |
StoreViewController* _storeController; | |
} | |
- (void)setUp { |
var fs = require('fs'); | |
var csv = require('csv'); | |
var md4 = require('js-md4'); | |
fs.createReadStream(__dirname+'/input.csv') | |
.pipe(csv.parse({columns: true})) | |
.pipe(csv.transform(function(record){ | |
record.my_field = md4(record.my_field); | |
TODOS:
- show .models() method and hookup
JavaScriptMVC's controllers are many things. They are a jQuery plugin factory. They can be used as a traditional view, making pagination widgets and grid controls. Or, they can be used as a traditional controller, initializing and controllers and hooking them up to models. Mostly, controller's are a really great way of organizing your application's code.
Controllers provide a number of handy features such as:
const express = require('express'); | |
const cons = require('consolidate'); | |
const bodyParser = require('body-parser'); | |
const cookieParser = require('cookie-parser'); | |
const session = require('express-session'); | |
const passport = require('passport'); | |
const FacebookStrategy = require('passport-facebook').Strategy; | |
const LocalStrategy = require('passport-local').Strategy; | |
const ensureLoggedIn = require('connect-ensure-login').ensureLoggedIn; |
The following is a VERY rough draft of an article I am working on for Alex MacCaw's @maccman's Book. It is very rough, but even now a worthwhile read. Suggestions / comments are very welcome! Please help me :-)
JavaScriptMVC (JMVC) is an open-source jQuery-based JavaScript framework. It is nearly a comprehensive (holistic) front-end development framework, packaging utilities for testing, dependency management, documentation, and a host of useful jQuery plugins.
Yet every part of JavaScriptMVC can be used without every other part, making the library lightweight. Its Class, Model, View, and Controller combined are only 7k minified and compressed, yet even they can be used independently. JavaScriptMVC's independence lets you start small and scale to meet the challenges of the most complex applications on the web.
This chapter covers only JavaScriptMVC's
###The Issue With Forever Forever is great for running node services, with a minor setback: the word "forever" doesn't apply to system reboots.
###The solution, run node apps as a system service logged in as root
vim /etc/init/node-app.conf
Contents for node-app.conf
(function($) { | |
function parseImagesFromCSS(doc) { | |
var i, j, | |
rule, | |
image, | |
pattern = /url\((.*)\)/, | |
properties = ['background-image', '-webkit-border-image'], | |
images = {}; | |
if (doc.styleSheets) { |