Skip to content

Instantly share code, notes, and snippets.

View Gyumeijie's full-sized avatar
🎯
Focusing

YuMeiJie Gyumeijie

🎯
Focusing
View GitHub Profile
@Gyumeijie
Gyumeijie / babel
Last active March 1, 2018 09:28
using babel
Assumme that we have already installed babel-cli command using `npm install --global babel-cli`.
1. Configuration .babelrc, the basic format of this file is shown as the following:
{
"presets": [],
"plugins": []
}
2. Install some plunins
@Gyumeijie
Gyumeijie / bash-command-line
Last active January 30, 2018 09:12
The command line arg V.S The standard input of a command
In most case, if a command takes a file name as a command line arg, we can also use the content of
the file as the standard input of a command, the two ways have the same effect.
For example, a directory contains the following files:
example1.txt
example2.txt
example3.txt
example4.txt
example5.txt
@Gyumeijie
Gyumeijie / cut-filename
Last active February 28, 2018 08:06
Remove suffix of batch files
# We first get a list of file with suffix
# and then use `cut` utility to split the
# full filename into a name and suffix using
# dot as delimiter.
cut -f1 -d'.' <<<$(ls *.*)
@Gyumeijie
Gyumeijie / sed-cheatsheet
Last active December 29, 2022 12:51 — forked from ssstonebraker/sed cheatsheet
Sed Cheatsheet
FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'