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 |
<ESC>
:
+ <command>
1 | :wq |
2k
to jump 2 lines up:set rnu
punctuation
<absolute-line-numbers>
abcABCabc
, fC
to find middle Cfoo.bar<>
, move to r by t<
t/T/f/F
t/T/f/F
word
yt;
or yw
p
P
d3j
or 3dd
1 | # edit neariest word inside symbol, e.g. } |
q
+ a~z
a~z
normal mode
+ q
to quit recording@
+ a~z
to excute macrom
+ a~z
a~z
'
+ a~z
''
"
+ a~z
0~9
"+*/:%-
:reg
see all registers"
the default(unnamed) register0
the default register for y
(yank)+
, *
the system clipboard/
the latest search keyword:
the latest used command%
the current file path#
the last edited file“adw : delete the word and save to register
a
===
"0p
- paste from last yankSearch
and Command mode
ctrl
+ r
+ <register>
*:%s/<ctrl+r>//abc/gc
to replace the lastest search keyword(*) toabc
with confirmation dialog
Ctrl + v
to enter Visual block mode
Shift + i
#
1 | # increase the first right number in the line |
Ideavim
V
icon on the right bottom corner~/.ideavimrc
1 | :w !diff % - |
w
without filename will output to stdin!
will excute bash in vim%
is current file in vimdiff
with -
will read content from stdinWhen 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.