Prints the size of each modules included in a webpack bundle. Add pathinfo: true, in the output property of your webpack configuration, then run node webpack-packages-size.js path_to_the_bundle.js.
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
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2011 Benoît Zugmeyer <alk at graou dot fr> | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
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
| Object.getOwnPropertyNames(Array.prototype).forEach(function (name) { | |
| if (!(name in NodeList.prototype)) | |
| Object.defineProperty(NodeList.prototype, name, Object.getOwnPropertyDescriptor(Array.prototype, name)); | |
| }); | |
| /* ... */ | |
| /* Profit! */ | |
| document.querySelectorAll('div').slice(3, 10); | |
| document.body.childNodes.reduce(function (total, el) { return total + el.offsetHeight; }, 0); |
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 dd(chunks) { | |
| const variables = [].slice.call(arguments, 1); | |
| let formated = ""; | |
| for (let i = 0; i < chunks.length; i += 1) { | |
| formated += chunks[i] | |
| if (i < chunks.length - 1) { | |
| formated += variables[i]; | |
| } |
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
| #!/bin/python | |
| import usb | |
| import subprocess | |
| import time | |
| import json | |
| # Put: | |
| # SUBSYSTEMS=="usb", ATTRS{idVendor}=="0c45", ATTRS{idProduct}=="7403", GROUP="users", | |
| # MODE="0666" |
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
| var It = (function () { | |
| var STOP = {}; | |
| function Iterator(next) { | |
| this._next = next; | |
| this._item = {}; | |
| this._index = -1; | |
| } | |
| Iterator.prototype = { |
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
| #!/bin/bash | |
| set -euo pipefail | |
| if [[ $# -eq 0 ]]; then | |
| echo "Usage: $0 mydomain.com" | |
| exit 1 | |
| fi | |
| name=$1 |
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
| extern crate kuchiki; | |
| #[macro_use] | |
| extern crate string_cache; | |
| macro_rules! h{ | |
| ($name:tt) => { | |
| h!($name { } =>) | |
| }; | |
| ($name:tt => $($other:expr)*) => { | |
| h!($name { } => $($other)*) |
https://chromium.googlesource.com/chromium/src/+/master/docs/linux_build_instructions.md
https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md#usage-as-a-c_library
https://chromium.googlesource.com/chromium/src/+/lkcr/docs/linux_suid_sandbox_development.md
About the chrome_sandbox: it's still needed https://bugs.archlinux.org/task/36969
https://www.chromium.org/developers/gn-build-configuration
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
| const colors = ["red", "blue", "yellow", "white", "black"] | |
| function createChart(width, height) { | |
| const svg = d3.select("body") | |
| .append("svg") | |
| .attr("width", width) | |
| .attr("height", height) | |
| .attr("style", "background-color: grey; margin: 10px") | |
| const minCellSize = 16 | |
| const cellSpacing = 6 |
OlderNewer