Go to the egghead website, i.e. Building a React.js App
run
$.each($('h4 a'), function(index, video){
console.log(video.href);
});Go to the egghead website, i.e. Building a React.js App
run
$.each($('h4 a'), function(index, video){
console.log(video.href);
});(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| var app = require(process.cwd() + '/app'); | |
| var winston = require('winston'); | |
| var _ = require('lodash'); | |
| // Set up logger | |
| var customColors = { | |
| trace: 'white', | |
| debug: 'green', | |
| info: 'green', | |
| warn: 'yellow', |
| var express = require('express'); | |
| var session = require('express-session'); | |
| var cookieParser = require('cookie-parser'); | |
| var flash = require('connect-flash'); | |
| var app = express(); | |
| app.use(cookieParser('secret')); | |
| app.use(session({cookie: { maxAge: 60000 }})); | |
| app.use(flash()); |
| var express = require('express'); | |
| var cookieParser = require('cookie-parser'); | |
| var session = require('express-session'); | |
| var flash = require('express-flash'); | |
| var handlebars = require('express-handlebars') | |
| var app = express(); | |
| var sessionStore = new session.MemoryStore; | |
| // View Engines |
| 'use strict'; | |
| // simple express server | |
| var express = require('express'); | |
| var app = express(); | |
| var router = express.Router(); | |
| app.use(express.static('public')); | |
| app.get('/', function(req, res) { | |
| res.sendfile('./public/index.html'); |
| // Update: Hey Folks - I've got a full Gulpfile with everything else over at https://github.com/wesbos/React-For-Beginners-Starter-Files | |
| var source = require('vinyl-source-stream'); | |
| var gulp = require('gulp'); | |
| var gutil = require('gulp-util'); | |
| var browserify = require('browserify'); | |
| var reactify = require('reactify'); | |
| var babelify = require('babelify'); | |
| var watchify = require('watchify'); | |
| var notify = require('gulp-notify'); |
| ls -1 *.json | while read jsonfile; do mongoimport -d support -c logs -file $jsonfile --jsonArray -type json; done |
| mongoimport | |
| -h [ --host ] arg mongo host to connect to ( <set name>/s1,s2 for sets) | |
| -u [ --username ] arg username | |
| -p [ --password ] arg password | |
| -d [ --db ] arg database to use | |
| -c [ --collection ] arg collection to use (some commands) | |
| -f [ --fields ] arg comma separated list of field names e.g. -f name,age | |
| --file arg file to import from; if not specified stdin is used | |
| --drop drop collection first | |
| --upsert insert or update objects that already exist |
Whenever we change our templates we still have to use our build script and this can get annoying. Thankfully with webpack-dev-server and BrowserSync we can fix this:
npm i -D browser-sync browser-sync-webpack-plugin webpack-dev-server
BrowserSync will act like a proxy, waiting for webpack to do its thing and then reloading the browser for us.