This file contains 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
If you are using Google Chrome and Client SSL Cert and you are tired of constantly selecting certificates, try this: | |
1. Download and extract Chrome policy templates from here: http://dl.google.com/dl/edgedl/chrome/policy/policy_templates.zip | |
2. Start the Local Group Policy Editor: Start > Run > gpedit.msc > OK | |
3. Right-click on Computer Policy > Computer Configuration > Administrative Templates and choose Add/Remove Templates… | |
4. Click Add…, choose policy_templates\windows\adm\en-US\chrome.adm (from the already downloaded and extracted policy templates) and click Open (Note: if your Windows language is different from en-US choose the chrome.adm from the respective language folder) | |
5. Navigate to Local Computer Policy > Computer Configuration > Administrative Templates > Classic Administrative Templates (ADM) > Google > Google Chrome > Content Settings | |
6. Double-click on Automatically select client certificates for these sites | |
7. Click Enabled | |
8. Click Show… in the Options pane |
This file contains 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
All files\s*\|\s*([0-9.]+) |
The following code will produce code-splitting in Webpack, which means that the source code will be split into several files that will be loaded async at runtime.. More info here;
import('./some-module').then((SomeModule) => {});
This file contains 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
export default function retargetEvents(el) { | |
// Here include necessary events' name to track | |
['onClick', 'onChange'].forEach(eventType => { | |
const transformedEventType = eventType.replace(/^on/, '').toLowerCase(); | |
el.addEventListener(transformedEventType, event => { | |
for (let i in event.path) { | |
const item = event.path[i], | |
internalComponent = findReactInternal(item); |
This file contains 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
npm set registry https://r.npm.taobao.org # 注册模块镜像 | |
npm set disturl https://npm.taobao.org/dist # node-gyp 编译依赖的 node 源码镜像 | |
## 以下选择添加 | |
npm set sass_binary_site https://npm.taobao.org/mirrors/node-sass # node-sass 二进制包镜像 | |
npm set electron_mirror https://npm.taobao.org/mirrors/electron/ # electron 二进制包镜像 | |
npm set ELECTRON_MIRROR https://cdn.npm.taobao.org/dist/electron/ # electron 二进制包镜像 | |
npm set puppeteer_download_host https://npm.taobao.org/mirrors # puppeteer 二进制包镜像 | |
npm set chromedriver_cdnurl https://npm.taobao.org/mirrors/chromedriver # chromedriver 二进制包镜像 | |
npm set operadriver_cdnurl https://npm.taobao.org/mirrors/operadriver # operadriver 二进制包镜像 |
This file contains 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
on run {input, parameters} | |
set logPath to "Dropbox/Dictionary/words.txt" | |
set lookUpWord to quoted form of (input as string) | |
tell application "System Events" to tell (process 1 where frontmost is true) | |
set windowTitle to name | |
try | |
set windowTitle to windowTitle | |
set titleBar to name of window 1 | |
end try |
This file contains 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
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
# Don't add passphrase | |
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
cat jwtRS256.key | |
cat jwtRS256.key.pub |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
,elem.offsetTop
,elem.offsetWidth
,elem.offsetHeight
,elem.offsetParent