Skip to content

Instantly share code, notes, and snippets.

@edwinwright
edwinwright / circ-dep-plugin-config.js
Created November 30, 2021 10:53 — forked from sfrieson/circ-dep-plugin-config.js
Custom configuration around the circular-dependency-plugin to help avoid new ones.
const CircularDependencyPlugin = require('circular-dependency-plugin');
const CIRC_DEP_MAX = 238;
const defaultConfig = {
aggregateDirDepth: 2,
exclude: /node_modules/,
include: /.*/,
logWarnings: true,
logErrors: true,
@edwinwright
edwinwright / macos-app-icon.md
Created August 22, 2019 19:17 — forked from jamieweavis/macos-app-icon.md
How to make an app icon for macOS using iconset & iconutil

How to create a .icns macOS app icon

How to make an app icon for macOS using iconset & iconutil

Saving images

Save your app icon with the following names & dimensions:

Name Dimensions
icon_16x16.png 16x16
@edwinwright
edwinwright / parse_dotenv.bash
Created March 6, 2019 10:50 — forked from judy2k/parse_dotenv.bash
Parse a .env (dotenv) file directly using BASH
# Pass the env-vars to MYCOMMAND
eval $(egrep -v '^#' .env | xargs) MYCOMMAND
# … or ...
# Export the vars in .env into your shell:
export $(egrep -v '^#' .env | xargs)
@edwinwright
edwinwright / gh-pages-deploy.md
Created September 6, 2016 20:49 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@edwinwright
edwinwright / 0_reuse_code.js
Created June 3, 2016 10:00
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@edwinwright
edwinwright / umd-script-boilerplate.js
Last active August 29, 2015 14:27 — forked from cferdinandi/umd-script-boilerplate.js
A simple boilerplate for UMD JS modules.
(function (root, factory) {
if ( typeof define === 'function' && define.amd ) {
define([], factory(root));
} else if ( typeof exports === 'object' ) {
module.exports = factory(root);
} else {
root.myPlugin = factory(root);
}
})(typeof global !== "undefined" ? global : this.window || this.global, function (root) {

Header 1

Header 2

Header 3 ### (Hashes on right are optional)

Header 4

Header 5

Markdown plus h2 with a custom ID ## {#id-goes-here}

Link back to H2

This is a paragraph, which is text surrounded by whitespace. Paragraphs can be on one

Template Components

Used to provide structural templates.

Pattern

t-template-name
t-template-name--modifier-name
t-template-name__subcomponent-name--subcomponent-modifier-name