The FAQ maintained by Github covers most stumbling blocks, some other tips and tricks supplied here.
Add _site
to .gitignore
. The generated site should not be uploaded to Github since its gets generated by github.
// ---------------------------------------------------------- | |
// A short snippet for detecting versions of IE in JavaScript | |
// without resorting to user-agent sniffing | |
// ---------------------------------------------------------- | |
// If you're not in IE (or IE version is less than 5) then: | |
// ie === undefined | |
// If you're in IE (>=5) then you can determine which version: | |
// ie === 7; // IE7 | |
// Thus, to detect IE: | |
// if (ie) {} |
#!/bin/sh | |
# | |
# git autodeploy script when it matches the string "[deploy]" | |
# | |
# @author icyleaf <icyleaf.cn@gmail.com> | |
# @link http://icyleaf.com | |
# @version 0.1 | |
# | |
# Usage: | |
# 1. put this into the post-receive hook file itself below |
The FAQ maintained by Github covers most stumbling blocks, some other tips and tricks supplied here.
Add _site
to .gitignore
. The generated site should not be uploaded to Github since its gets generated by github.
# delete local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |
# requires >= Bash 4.3 | |
# note: the prompt will not be updated if you use a custom PS1 which contains a newline character | |
set editing-mode vi | |
set keymap vi-command | |
set show-mode-in-prompt on | |
# if it's configured correctly, your prompt will be prefixed with a `+` while in insert mode and a `:` when in command mode. |
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048
# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
[Unit] | |
Description=Shadowsocks Client | |
After=network.target | |
[Service] | |
Type=forking | |
PIDFile=/run/shadowsocks/ss-client.pid | |
PermissionsStartOnly=yes | |
ExecStartPre=/bin/mkdir -p /run/shadowsocks | |
ExecStartPre=/bin/chown root:root /run/shadowsocks |
{% comment %} | |
# | |
# Change date order by adding '| reversed' | |
# To sort by title or other variables use {% assign sorted_posts = category[1] | sort: 'title' %} | |
# | |
{% endcomment %} | |
{% assign sorted_cats = site.categories | sort %} | |
{% for category in sorted_cats %} | |
{% assign sorted_posts = category[1] | reverse %} | |
<h2 id="{{category[0] | uri_escape | downcase }}">{{category[0] | capitalize}}</H2> |
- Open Automator | |
- File -> New -> Service | |
- Change "Service Receives" to "files or folders" in "Finder" | |
- Add a "Run Shell Script" action | |
- Change "Pass input" to "as arguments" | |
- Paste the following in the shell script box: open -n -b "com.microsoft.VSCode" --args "$*" | |
- Save it as something like "Open in Visual Studio Code" |
{% comment %} | |
# | |
# I modified the original code from http://anjesh.github.io/2015/01/25/collection-pagination-working-github-pages/ | |
# | |
# Make a collection in _config.yml and create the folder _your_collection in your root. | |
# | |
# collections: | |
# your_collection: | |
# output: true | |
# permalink: /:collection/:title/ |