Recommend plugins
- Make your diff so fancy - diff-so-fancy
- ZSH Git alias
Commands
1 | # Remove untracked files |
1 | # Remove untracked files |
From wiki-JPEG, we could see a baseline/progressive JPEG have byte marker mapping differently as following:
Short name | Bytes | Payload | Name |
---|---|---|---|
SOF0 | 0xFF, 0xC0 | variable size | Start Of Frame (baseline DCT) |
SOF2 | 0xFF, 0xC2 | variable size | Start Of Frame (progressive DCT) |
So to tell the image is progressive JPEG, we need to check if it contains 0xFF, 0xC0
which is c2ff
in Two-byte hexadecimal display
.
To measure gzip sizing for a request, you don’t need to actually gzip it, just use pipe |
to pipe the stream from curl
to gzip
to wc
:
1 | # before gzip |
As you can see, before gzip it’s 57847 bytes, after gzip it’s 10443 bytes.
You could do same things to measure a file gzip sizing by gzip with -c
option, so it won’t actually gzip it.
1 | $ gzip -c foo.jpg | wc -c |
abcABCabc
, fC
to find middle Cfoo.bar<>
, go to r by t<
d3j
or 3dd
0
is default clipboard for y
(yank)+
is system clipboard"adw
: delete the and save it to register a
"0p
: paste from last yankfoo
and replace it with bar
, yw
then /bardw"0p
ctrl + r + register key
to use the value in registerBar
in fooBarBeBaz
, fBdfe
1 | # Make a word uppercase |
In vim, you will frequently need to manipulate multi line with y3j
4yy
or something else, relative line mode in IDE could help you easy to count the line number.
1 | :set rnu |
1 | "editor.lineNumbers": "relative", |
1 | :w !diff % - |
w
without filename will save to stdin!
will excute bash in vim%
is current file in vimdiff
with -
will read content from stdin"
is the comment symbol in .vimrc, could only be placed at the start of line
1 | "Enable copy paste from system clibboard |
When creating fixed navigation bar with padding, we got :
1 | position: fixed; |
However you will find padding-right disappear, the reason is the width is window width + padding-left + padding-right
. It is exceed the window, to fix it just use width: calc(100% - 30px)
to reduce the width
1 | position: fixed; |
See the Pen Fixed nav with correct padding by AsinChen (@Asing1001) on CodePen.
this > Webhooks > Receive a web request
event name
and click create trigger
that > Line > Send message
Message
as value1
Documentation
on the top right cornerevent name
and value1
then try the curl
example on the pagestart.bat
file with content npm start
nssm/win64
foldernssm install service-name
from command promptstart.bat
as Application Path, you could also add your startup Arguments here nssm start service-name
You could type nssm
anytime to see this document
1 | M:\nssm-2.24\win64>nssm |
bin
folder, configs are under etc
folder, logs are under var
folder
In situation doing thousands of http requests, it is easy to get error ECONNRESET
, for example :
1 | require('isomorphic-fetch'); |
To find ports status on windows, there is a default Windows GUI - Resource Monitor
or you could use netstat
via command prompt.