We started out with sass files with something like this (obvious brevity is obvious):
// colors.scss
$green: #37ab2e;
$white: #FFFFFF;
// skin.scss
.bg_green { color: $green; }
.fg_white { color: $white; }
We started out with sass files with something like this (obvious brevity is obvious):
// colors.scss
$green: #37ab2e;
$white: #FFFFFF;
// skin.scss
.bg_green { color: $green; }
.fg_white { color: $white; }
const { assert } = require('chai'); | |
function isError(e) { | |
if (typeof e === 'string') { | |
return Promise.reject(new Error(e)); | |
} | |
return Promise.resolve(e); | |
} | |
///////////////////////////////////////////////////////////////////////////////////// | |
// TEST CODE FOR PAYLOAD DATA CREATION | |
///////////////////////////////////////////////////////////////////////////////////// | |
var fs = require('fs'); | |
var fileName = '/tmp/results.json'; | |
fs.writeFile( fileName, JSON.stringify(res.body, null, 4), function (error) { | |
if (error) { | |
console.log(error); | |
} else { | |
console.log('JSON saved to temp dir: ', fileName); |
Currently considering https://github.com/webdriverio/webdrivercss
Core Goals:
{ | |
// Environments | |
// defines both global variables that are predefined as well as which rules | |
// should be on or off by default | |
"env": { | |
"browser" : true, // Browser global variables | |
"node" : true, // Node.js global variables and Node.js-specific rules | |
"amd" : true, // Defines require() and define() as global variables as per the amd spec. | |
"mocha" : false, // Adds all of the Mocha testing global variables. |
Why aren't I seeing my changes?
What do you mean 404 error?!?
Oh come ON, I just DID that!
How often are you working on something and are stuck trying to debug some irritation problem, only to discover after time that you've done something embarrassingly stupid? It's good to go through a checklist of "dumb" questions before spending an hour in the debugger or pouring over changesets.
Example:
// 1. Go to page https://www.linkedin.com/settings/email-frequency | |
// 2. You may need to login | |
// 3. Open JS console | |
// ([How to?](http://webmasters.stackexchange.com/questions/8525/how-to-open-the-javascript-console-in-different-browsers)) | |
// 4. Copy the following code in and execute | |
// 5. No more emails | |
// | |
// Bookmarklet version: | |
// http://chengyin.github.io/linkedin-unsubscribed/ |
// Usage: | |
// HoodieAdapter.create({type: "mystuff", url: "some/url"}) | |
// "type" is required. "url" is optional. | |
var hoodie, | |
get = Ember.get, | |
Promise = Ember.RSVP.Promise; | |
function mustImplement(message) { | |
var fn = function() { |
Because I've been so busy lately I haven't really had a chance to talk about anything I've built or been using, but i've been publishing so many new modules it's worth going back over.
Real quick, Getable is a mobile/desktop ordering and fullfillment application for commercial construction. Think mobile amazon/ebay for large construction jobsites.
First off, everything is realtime, using engine.io
with everything but long polling turned off. We tried leaving websockets on but there were some nasty bits that made the connection die and not come back on iPhone which we just couldn't debug in time so we turned it off.
Engine.io is a great module as it just provides a simple duplex stream-like (more on this later) interface that upgrades itself when available. This meant that in order to get some use out of it I had to write a few modules.
eiojson
sends JSON messages rather than strings bidirectiona