Skip to content

Instantly share code, notes, and snippets.

@flappyBug
flappyBug / practice.sh
Created August 28, 2020 14:18
Shell commands for Linux practice
mkdir ~/cli-practice; cd $_
touch readme.md
echo Hi there, this is a readme file. > readme.md
echo This is the second line of the readme >> readme.md
mv readme.md readme.txt
mkdir document
mv readme.txt document/introduction.txt
cp document/introduction.txt document/readme.txt
echo The quick brown fox jumps over a lazy dog > document/readme.txt
cp -r document docs
class Data {
final List<DataField> fields;
const Data( {this.fields});
}
class DataField {
final String name;
final Type type;
@flappyBug
flappyBug / filename.zsh
Created December 12, 2019 02:01 — forked from cuschk/filename.zsh
Zsh: file base name and extension
#!/usr/bin/env zsh
f='example.txt'
echo ${f:r}
#=> example
echo ${f:e}
#=> txt