Skip to content

Instantly share code, notes, and snippets.

View lizzietliu's full-sized avatar

Tunan lizzietliu

View GitHub Profile
@lizzietliu
lizzietliu / wkhtmltopdf-doc-0.12.4.txt
Created April 17, 2018 04:21
wkhtmltopdf document
https://wkhtmltopdf.org/usage/wkhtmltopdf.txt
Name:
wkhtmltopdf 0.12.4 (with patched qt)
Synopsis:
wkhtmltopdf [GLOBAL OPTION]... [OBJECT]... <output file>
Document objects:
wkhtmltopdf is able to put several objects into the output file, an object is
@lizzietliu
lizzietliu / wkhtmltopdf-Flexbox-hack.md
Last active April 17, 2018 04:20
wkhtmltopdf Flexbox hack

Originally from wkhtmltopdf/wkhtmltopdf#1522

Flexbox seems to be broken in wkhtmltopdf.

Here's a test case, which renders correctly in current versions of Chrome, Firefox, and Internet Explorer. wkhtmltopdf renders it as if the flex properties were not present.

Tested with the 0.12 Windows 32-bit download as found on http://wkhtmltopdf.org/ (wkhtmltox-win32_0.12.0-03c001d.exe). As you can see I tried using the -webkit- prefixes and they didn't help.

<!DOCTYPE html>
@lizzietliu
lizzietliu / yum-command.md
Created March 19, 2018 03:04
Yum command cheatsheet

Display yum commands and options

yum help

List all available packages

yum list available

List all installed packages

@lizzietliu
lizzietliu / git-cheatsheet.md
Created March 19, 2018 03:03
Git Command Cheatsheet

Git Basics

git init <directory>Create empty Git repo in speci ed directory. Run with no arguments to initialize the current directory as a git repository.

git clone <repo>Clone repo located at onto local machine. Original repo can be located on the local lesystem or on a remote machine via HTTP or SSH.

git config user.name <name> Define author name to be used for all commits in current repo. Devs commonly use --global ag to set con g options for current user.

git add <directory> Stage all changes in for the next commit. Replace with a to change a specific file.

@lizzietliu
lizzietliu / backup-mysql.md
Last active April 17, 2018 04:07
Auto Backup mysql Data Using shell script and crontab

CentOS 5.5 i386 architecture.

Make sure that you are as root. Now, create a directory that you will use to put your backup data, you can use this command below,

mkdir /home/backup

But before we continue, i will show you how do i backing up mysql data, here is the command

mysqldump -uroot -pMyPassword -hMyHost my_database_name &gt; /home/backup/backup.my_databases.sql