Skip to content

Instantly share code, notes, and snippets.

🎸
Focusing

DY-L dyllanwli

Block or report user

Report or block dyllanwli

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dyllanwli
dyllanwli / alphabet.py
Last active May 19, 2019
List all alphabet
View alphabet.py
# build-in package
import string
string.ascii_lowercase
# 'abcdefghijklmnopqrstuvwxyz'
list(string.ascii_lowercase)
# or
list(map(chr, range(97, 123)))
# ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
@dyllanwli
dyllanwli / copyfile.sh
Created May 13, 2019
Some linux command
View copyfile.sh
# linux command . Copy a file one hundred times
for n in {001..100}; do
cp file.jpg file-$n.jpg
done
@dyllanwli
dyllanwli / single_convert.sh
Created May 13, 2019
Libreoffice headless convert doc to pdf
View single_convert.sh
echo "hello world" > a.txt
soffice --headless --invisible --nodefault --nofirststartwizard \
--nolockcheck --nologo --norestore --convert-to pdf --outdir $(pwd) a.txt
# to run multiple convert just use * as a selector
View gist:5c76fe5a285700acc052a79e61e264ec
$(<command> | grep <something I want to grep> | awk '{print <the line I wants to get, e.g. $1>}')
@dyllanwli
dyllanwli / gist:37a9ca3d3085087cc59d0f62809cd0a2
Last active May 13, 2019
Docker SwitchDaemon on Windows
View gist:37a9ca3d3085087cc59d0f62809cd0a2
cd "C:\Program Files\Docker\Docker"
./DockerCli.exe -SwitchDaemon
# I should switch back if I still needs the original Daemon
You can’t perform that action at this time.