==========================
this will use derby-templates to render emails from files.
the controller
is just a module with view functions attached to it, it can be an empty object otherwise.
# Whitelist collections | |
ALLOW_COLLECTIONS = { | |
'accounts': true | |
'users': true | |
} | |
module.exports = (shareClient) -> | |
# Hold on to session object for later use. The HTTP req object is only | |
# available in the connect event | |
shareClient.use 'connect', (shareRequest, next) -> |
app = module.exports = require('derby').createApp 'component-examples', __filename | |
app.serverUse module, 'derby-stylus' | |
app.loadViews __dirname | |
app.loadStyles __dirname | |
app.use require 'l-progress/example' | |
# add more components here... | |
app.get '/', -> | |
componentNames = [] |
Clearly ES6 is a huge improvement over ES5, and tools like [6to5][] allow us to use these cool features now. I was reading [Replace CoffeeScript with ES6][replace coffeescript] by [Blake Williams][] and thought it was a great summary of how ES6 solves many of the same problems that CoffeeScript solves; however I'd like to comment on a few of Blake's points and talk about why I'll be sticking with CoffeeScript.
Classes in ES6 (like many of the syntax changes in ES6) are very similar to the CoffeeScript equivalent. To support browsers that are not fully ES5 compliant (e.g. IE8-), however, we still can't really use getters/setters, so ignoring these the comparison is:
See this Nim Forum Topic where this started.
Well I have a working Aporia version on my Yosemite OS X 10.10.2 from the new-suggest
branch of the repository.
BUT the lengths I had to go to get this working are plastered with stuff I did not understand :)
/* | |
The MIT License (MIT) | |
Copyright (c) 2015 Alexandre Kirszenberg | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTI |
04/26/2103. From a lecture by Professor John Ousterhout at Stanford, class CS142.
This is my most touchy-feely thought for the weekend. Here’s the basic idea: It’s really hard to build relationships that last for a long time. If you haven’t discovered this, you will discover this sooner or later. And it's hard both for personal relationships and for business relationships. And to me, it's pretty amazing that two people can stay married for 25 years without killing each other.
[Laughter]
> But honestly, most professional relationships don't last anywhere near that long. The best bands always seem to break up after 2 or 3 years. And business partnerships fall apart, and there's all these problems in these relationships that just don't last. So, why is that? Well, in my view, it’s relationships don't fail because there some single catastrophic event to destroy them, although often there is a single catastrophic event around the the end of the relation
It "types" the contents of the clipboard.
Why can't you just paste the contents you ask? Sometimes pasting just doesn't work.
The Windows version is written in AutoHotKey and easily compiles to an executable. It's a single line script that maps Ctrl-Shift-V to type the clipboard.
import Quill from 'quill' | |
import TableComponent from 'TableComponent' | |
import ReactDOM from 'react-dom' | |
const QuillEmbed = Quill.import('blots/block/embed'); | |
class QuillTable extends QuillEmbed { | |
static create(values) { | |
let node = super.create(values); |
const Page = require('puppeteer/lib/Page'); | |
// the following 2 methods are originally from: https://github.com/GoogleChrome/puppeteer/issues/85#issuecomment-341743259, with some modification to fit puppeteerv1.0.0 | |
async function newPageWithNewContext(browser) { | |
const { browserContextId } = await browser._connection.send('Target.createBrowserContext'); | |
const { targetId } = await browser._connection.send('Target.createTarget', { url: 'about:blank', browserContextId }); | |
const target = await browser._targets.get(targetId); | |
const client = await browser._connection.createSession(targetId); | |
const page = await Page.create(client, target, browser._ignoreHTTPSErrors, browser._appMode, browser._screenshotTaskQueue); | |
page.browserContextId = browserContextId; |