Models | Examples |
---|---|
Display ads | Yahoo! |
Search ads |
// Thanks to http://www.labs.saachitech.com/2012/10/23/pdf-generation-using-uiprintpagerenderer | |
// Note: including images in the HTML won't work, see here: | |
// https://github.com/nyg/HTMLWithImagesToPDF | |
import UIKit | |
// 1. Create a print formatter | |
let html = "<b>Hello <i>World!</i></b>" | |
let fmt = UIMarkupTextPrintFormatter(markupText: html) |
/** | |
* Credits | |
* @Bkucera: https://github.com/cypress-io/cypress/issues/2839#issuecomment-447012818 | |
* @Phrogz: https://stackoverflow.com/a/10730777/1556245 | |
* | |
* Usage | |
* ``` | |
* // Types "foo" and then selects "fo" | |
* cy.get('input') | |
* .type('foo') |
# Script for automatic setup of SOCKS proxy through SSH connection. | |
# It automatically teardowns SOCKS configuration before stopping. | |
# It's supposed to work on Mac OS X 10.6+ | |
# | |
# Author: Adam Stankiewicz (@sheerun) | |
# | |
[[ -n "$1" ]] || { echo "Usage: proxy user@example.com"; exit 1; } | |
# get service GUID and NAME (like Wi-Fi) to set SOCKS proxy |
- Avoid too many reflows (the browser to recalculate everything)
- Use advanced CSS3 for graphic card rendering
- Precalculate sizes and positions
The reflow appens as many times as there are frames per seconds. It recalculate all positions that change in order to diplay them. Basically, when you scroll you execute a function where you move things between two reflows. But there are functions that triggers reflows such as jQuery offset, scroll... So there are two things to take care about when you dynamically change objects in javascript to avoid too many reflows:
It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.
⚠️ Warning: this document is out of date.For the most recent webpack5 instructions see MIGRATION.md.
Storybook 6.2 includes experimental Webpack 5 support. Webpack 5 brings a variety of performance improvements, as well as exciting new features like module federation. Here's a quick guide to get you going.
// getComponent is a function that returns a promise for a component | |
// It will not be called until the first mount | |
function asyncComponent(getComponent) { | |
return class AsyncComponent extends React.Component { | |
static Component = null; | |
state = { Component: AsyncComponent.Component }; | |
componentWillMount() { | |
if (!this.state.Component) { | |
getComponent().then(Component => { |
❯ rollup --version | |
rollup version 0.25.3 | |
❯ time rollup -c ./rollup.js | |
rollup -c ./rollup.js 4.65s user 0.22s system 118% cpu 4.131 total | |
❯ time webpack | |
Hash: ebb00bbccd954c114d3c | |
Version: webpack 2.0.7-beta | |
Time: 3623ms |
Here are all of the resources mentioned by Deconstruct 2017 speakers, along with who recommended what. Please post a comment if I missed something or have an error!
- Seeing Like a State by James Scott
- Public Opinion by Walter Lippmann (Evan Czaplicki)
- A Pattern Language by Christopher Alexander (Brian Marick)
- Domain Driven Design by Eric Evans (Brian Marick)