- update 1: add a FAQ section
- update 2: benchmark chart and feature comparison table
- update 3:
- improve the table with missing features for antigen
- new
zplg timesresult
| #!/bin/bash | |
| ### | |
| ### my-script — does one thing well | |
| ### | |
| ### Usage: | |
| ### my-script <input> <output> | |
| ### | |
| ### Options: | |
| ### <input> Input file to read. | |
| ### <output> Output file to write. Use '-' for stdout. |
| # Make zsh start INSTANTLY with this one weird trick. | |
| # | |
| # https://asciinema.org/a/274255 | |
| # | |
| # HOW TO USE | |
| # | |
| # 1. Download this script. | |
| # | |
| # curl -fsSL -o ~/instant-zsh.zsh https://gist.github.com/romkatv/8b318a610dc302bdbe1487bb1847ad99/raw | |
| # |
React recently introduced an experimental profiler API. This page gives instructions on how to use this API in a production release of your app.
Table of Contents
React DOM automatically supports profiling in development mode for v16.5+, but since profiling adds some small additional overhead it is opt-in for production mode. This gist explains how to opt-in.
| const http2 = require('http2'); | |
| const fs = require('fs'); | |
| const path = require('path'); | |
| const zlib = require('zlib'); | |
| const brotli = require('brotli'); // npm package | |
| const PORT = 3032; | |
| const BROTLI_QUALITY = 11; // slow, but we're caching so who cares | |
| const STATIC_DIRECTORY = path.resolve(__dirname, '../dist/'); | |
| const cache = {}; |
| ;; based on @babygau's answer here https://stackoverflow.com/a/40559502 | |
| #NoEnv ; recommended for performance and compatibility with future autohotkey releases. | |
| #UseHook | |
| #InstallKeybdHook | |
| #SingleInstance force | |
| SendMode Input | |
| ;; deactivate capslock completely | |
| SetCapslockState, AlwaysOff |
| { | |
| "title": "ALT <=> CMD in External keyboard", | |
| "rules": [ | |
| { | |
| "description": "Swap option and command in External keyboard", | |
| "manipulators": [ | |
| { | |
| "conditions": [ | |
| { | |
| "type": "device_unless", |
If you hate git submodule, then you may want to give git subtree a try.
When you want to use a subtree, you add the subtree to an existing repository where the subtree is a reference to another repository url and branch/tag. This add command adds all the code and files into the main repository locally; it's not just a reference to a remote repo.
When you stage and commit files for the main repo, it will add all of the remote files in the same operation. The subtree checkout will pull all the files in one pass, so there is no need to try and connect to another repo to get the portion of subtree files, because they were already included in the main repo.
Let's say you already have a git repository with at least one commit. You can add another repository into this respository like this:
No need to close your terminal tab anymore (or furiously hitting your keyboard) when your SSH session frozen. SSH has an escape sequence that will let you properly close the connection and give you back the prompt. In order, type: Return, ~, .
That’s it! This will send an escape sequence to your local SSH socket and close the connection.
SSH has more escape sequences under the hood, hit Return ~ ? to display the full list:
Sometimes you have PSD or a small-ish SQLite file you’d like to track with Git. The problem is Git is bad at tracking changes in big binary files by default. With Git Large File Storage (LFS) you can replace these large files with text pointers while storing the file contents on a remote server. Both GitHub and BitBucket support it. Here is how to get started:
1. Install Git LFS extension (Mac here):
brew install git-lfs