Web Notes
2016.08.20
Using Liquid in Jekyll - Live with Demos
Liquid is a simple template language that Jekyll uses to process pages for your site. With Liquid you can output complex contents without additional plugins.
Git distributions for all platforms are available on the official Git SCM (Software Configuration Management) web site - https://git-scm.com.
Configure user information for all local repositories.
git config --global user.name "[name]"
# sets the name you want attached to your commit transactions
git config --global user.email "[email address]"
# sets the email you want attached to your commit transactions
git config --global color.ui auto
# enables helpful colourization of command line output
When starting out with a new repository, you only need to do it once; either locally, then push to Git host sites, or by cloning an existing repository.
git init
# turn an existing directory into a git repository
git clone [url]
# clone (download) a repository that already exists on Git host sites,
# including all of the files, branches, and commits
Branches are an important part of working with Git. Any commits you make will be made on the branch you’re currently “checked out” to. Use git status
to see which branch that is.
git branch [branch-name]
# creates a new branch
git checkout [branch-name]
# switches to the specified branch and updates the working directory
git merge [branch]
# combines the specified branch's history into the current branch
# this is usually done in pull requests, but is an important Git operation
git branch -d [branch-name]
# deletes the specified branch
Sometimes it may be a good idea to exclude files from being tracked with Git. This is typically done in a special file named .gitignore
. You can find help templates for .gitignore
files at https://github.com/github/gitignore for different projects.
Synchronize your local repository with the remote repository on Git host sites.
git fetch
# downloads all history from the remote tracking branches
git merge
# combines remote tracking branch into current local branch
git push
# uploads all local branch commits to Git host sites
git pull
# updates your current local working branch
# with all new commits from the corresponding remote branch
# 'git pull' is a combination of 'git fetch' & 'git merge'
Browse and inspect the evolution of project files.
git log
# lists version history of the current branch
git log --follow [file]
# lists version history for a file, including renames
git diff [first-branch]...[second-branch]
# shows content differences between two branches
git show [commit]
# outputs metadata and content changes of the specified commit
git add [file]
# snapshots the file in preparation for versioning
git commit -m "[descriptive message]"
# records file snapshots permanently in version history
Erase mistakes and craft replacement history.
git reset [commit]
# undoes all commits after [commit], preserving changes locally
git reset --hard [commit]
# discards all hostory and changes back to the specified commit
CAUTION! Changing history can have nasty side effects. If you need to change commits that exist on remote Git host sites, proceed with caution.
git checkout
Frank Lin
Web Notes
2016.08.20
Liquid is a simple template language that Jekyll uses to process pages for your site. With Liquid you can output complex contents without additional plugins.
Tutorials
2020.01.09
IKEv2, or Internet Key Exchange v2, is a protocol that allows for direct IPSec tunnelling between networks. It is developed by Microsoft and Cisco (primarily) for mobile users, and introduced as an updated version of IKEv1 in 2005. The IKEv2 MOBIKE (Mobility and Multihoming) protocol allows the client to main secure connection despite network switches, such as when leaving a WiFi area for a mobile data area. IKEv2 works on most platforms, and natively supported on some platforms (OS X 10.11+, iOS 9.1+, and Windows 10) with no additional applications necessary.
Tutorials
2017.04.20
I've known Heroku for a long time, but never have a try to build with it. This time, I found a beautiful file indexer, h5ai, that requires PHP 5.5+, and Heroku is a perfect platform to build and host it.