How to make an app icon for macOS using
iconset&iconutil
Save your app icon with the following names & dimensions:
| Name | Dimensions |
|---|---|
icon_16x16.png |
16x16 |
| const unordered = { | |
| b: "foo", | |
| c: "bar", | |
| a: "baz", | |
| }; | |
| console.log(JSON.stringify(unordered)); | |
| // → '{"b":"foo","c":"bar","a":"baz"}' | |
| const ordered = Object.keys(unordered) |
| const CircularDependencyPlugin = require('circular-dependency-plugin'); | |
| const CIRC_DEP_MAX = 238; | |
| const defaultConfig = { | |
| aggregateDirDepth: 2, | |
| exclude: /node_modules/, | |
| include: /.*/, | |
| logWarnings: true, | |
| logErrors: true, |
| # 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) |
| function loadScript(url, callback) { | |
| var script = document.createElement("script") | |
| script.type = "text/javascript"; | |
| if (script.readyState) { | |
| script.onreadystatechange = function () { | |
| if (script.readyState === "loaded" || script.readyState === "complete") { | |
| script.onreadystatechange = null; | |
| callback(); | |
| } | |
| }; |
| git filter-branch --env-filter ' | |
| OLD_EMAIL="[email protected]" | |
| NEW_NAME="New Name" | |
| NEW_EMAIL="[email protected]" | |
| if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ] | |
| then | |
| export GIT_COMMITTER_NAME="$NEW_NAME" | |
| export GIT_COMMITTER_EMAIL="$NEW_EMAIL" | |
| fi |
| // Basic verification | |
| // Returns the promise from somethingAsync() | |
| // The test passes if resolved, fails if rejected | |
| it('does something async with promises', function() { | |
| return somethingAsync(); | |
| }); | |
| // Verify a fulfilled promise | |
| // Returns the promise from somethingAsync() and runs assertions in the onFulfilled callback |
| #!/bin/bash | |
| HOOK_NAMES="pre-commit" | |
| HOOK_DIR=$(git rev-parse --show-toplevel)/.git/hooks | |
| INSTALL_DIR=$(git rev-parse --show-toplevel)/hooks | |
| COLOR_GREEN=`tput setaf 2` | |
| COLOR_RESET=`tput sgr0` | |
| for hook in $HOOK_NAMES; do | |
| echo "Installing $hook hook..." |
| const injectScript = (function() { | |
| const scripts = {}; | |
| return (url) => { | |
| if (scripts[url]) { | |
| return scripts[url]; | |
| } else { | |
| const promise = new Promise((resolve, reject) => { | |
| const head = document.getElementsByTagName('head')[0]; | |
| const script = document.createElement('script'); | |
| script.type = 'text/javascript'; |
| const response = { | |
| "code": 200, | |
| "status": "Ok", | |
| "copyright": "© 2016 MARVEL", | |
| "attributionText": "Data provided by Marvel. © 2016 MARVEL", | |
| "attributionHTML": "<a href=\"http://marvel.com\">Data provided by Marvel. © 2016 MARVEL</a>", | |
| "etag": "2f08937547f5cbb41e1f5845f9b3adf36417e332", | |
| "data": { | |
| "offset": 0, | |
| "limit": 20, |