| const md5File = require('md5-file'); | |
| const path = require('path'); | |
| // CSS styles will be imported on load and that complicates matters... ignore those bad boys! | |
| const ignoreStyles = require('ignore-styles'); | |
| const register = ignoreStyles.default; | |
| // We also want to ignore all image requests | |
| // When running locally these will load from a standard import | |
| // When running on the server, we want to load via their hashed version in the build folder |
If you're trying to do this, you came to the right place!
Watch this code work in real time: https://twitter.com/CodingDoug/status/940022568089554944
See also this gist for copying in the other direction: https://gist.github.com/CodingDoug/44ad12f4836e79ca9fa11ba5af6955f7
| import React from 'react'; | |
| const handleChange = (handler) => ({target: {files}}) => | |
| handler(files.length ? {file: files[0], name: files[0].name} : {}); | |
| export default ({ | |
| input: {onChange, onBlur, value: omitValue, ...inputProps}, | |
| meta: omitMeta, | |
| ...props | |
| }) => ( |
| "use strict"; | |
| const autoprefixer = require("autoprefixer"); | |
| const ExtractTextPlugin = require("extract-text-webpack-plugin"); | |
| const Visualizer = require("webpack-visualizer-plugin"); | |
| module.exports = { | |
| modify: (baseConfig, { target, dev }, webpack) => { | |
| const appConfig = Object.assign({}, baseConfig); |
- Clone the repo from https://github.com/sullivanv/emacs
- Move all of the files from inside of that directory into
~/.emacs.d, including the hidden file.emacs - If you don't have a
~/.emacs.ddirectory, create one. - Navigate to
~/.emacs.dand rename.emacstoinit.el - Open emacs and
C-c C-h - You've got it!
How to fix the email in your header
- In your home directory, find, or create if needed, a file called
.zshrc
- If your not at 42, you'll likely not be using zshell, so the file should instead be
.bashrc
Cross-origin resource sharing (CORS) is a mechanism that allows restricted resources (e.g. fonts) on a web page to be requested from another domain outside the domain from which the first resource was served. This is set on the server-side and there is nothing you can do from the client-side to change that setting, that is up to the server/API. There are some ways to get around it tho.
Sources : MDN - HTTP Access Control | Wiki - CORS
CORS is set server-side by supplying each request with additional headers which allow requests to be requested outside of the own domain, for example to your localhost. This is primarily set by the header:
Access-Control-Allow-Origin