- Clear feature ownership
- Module usage predictibility (refactoring, maintainence, you know what's shared, what's not, prevents accidental regressions, avoids huge directories of not-actually-reusable modules, etc)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for nginx: location ~ ^/wp-json/ { return 404; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // XPath CheatSheet | |
| // To test XPath in your Chrome Debugger: $x('/html/body') | |
| // http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/ | |
| // 0. XPath Examples. | |
| // More: http://xpath.alephzarro.com/content/cheatsheet.html | |
| '//hr[@class="edge" and position()=1]' // every first hr of 'edge' class |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function (context, trackingId, options) { | |
| const history = context.history; | |
| const doc = document; | |
| const nav = navigator || {}; | |
| const storage = localStorage; | |
| const encode = encodeURIComponent; | |
| const pushState = history.pushState; | |
| const typeException = 'exception'; | |
| const generateId = () => Math.random().toString(36); | |
| const getId = () => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { | |
| cloneElement, | |
| useState, | |
| useEffect, | |
| useRef, | |
| HTMLAttributes, | |
| ReactElement | |
| } from "react"; | |
| //////////////////////////////////////////////////////////////////////////////// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useState, useMemo } from "react" | |
| import { calculateTotals } from "./utils" | |
| export default function SelectTickets({ | |
| context: { workshopData, subscriberCode }, | |
| send | |
| }) { | |
| let initialTicketsToPurchase = useMemo( | |
| () => | |
| workshopData.ticketTypes.reduce((ticketsToPurchase, type, index) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // To remove an item from an array by id: | |
| return state.filter(item => item.id !== action.id) | |
| // To remove a key from an object by id: | |
| let copy = Object.assign({}, state) // assuming you use Object.assign() polyfill! | |
| delete copy[action.id] // shallowly mutating a shallow copy is fine | |
| return copy | |
| // (Bonus) The same with object spread operator proposal: |
Getting started:
Related tutorials:
-
Open Terminal
Ctrl+Alt+TDownload Firefox Developer Editiontar filewget https://download.mozilla.org/?product=firefox-aurora-latest-ssl&os=linux64&lang=en-US -
Copy tar file to
optsudo cp -rp firefox-35.0a2.en-US.linux-x86_64.tar.bz2 -
Open
optfolder (cd /opt/) and untar filesudo tar xjf firefox-35.0a2.en-US.linux-x86_64.tar.bz2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:w="urn:schemas-microsoft-com:office:wordml" | |
| xmlns:wx="urn:schemas-microsoft-com:office:auxHint"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <title>Preview</title> | |
| <meta name="viewport" content="width=device-width,initial-scale=1"> |