Skip to content

Instantly share code, notes, and snippets.

benbalter /
Last active Mar 24, 2021
Example of how to use Jekyll's `excerpt` tag.

If your post looked something like:

# Awesome Blog Post

Here is an example post to show how to use the new `excerpt` tag.

The excerpt tag provides a quick and easy way to tease a post by exposing only the first paragraph such as on a blog index page.
bollwyvl /
Last active Mar 30, 2021
A fishbone editor
  • Make a bulleted Markdown list in the top left to update the list
  • Press edit to hide the editor
  • Press save to use [SVG Crowbar][crowbar] to save a copy
  • Click to drag nodes

This is an integration of [this implementation][orig] of a [Fishbone or Ishikawa][ish] diagram, which shows contributions of different levels of a hierarchy to a main concept, with a Markdown editor for making quick diagrams.

The diagram is implemented in [d3.js][d3], while rich-text editing is provided by [CodeMirror][cm], and [marked][mkd] handles Markdown processing.

brenopacheco /
Last active Mar 31, 2021
storing git credentials with gpg and .netrc

storing git credentials with gpg and .netrc

  1. set up git credential helper in .gitconfig
        helper = /usr/share/git/credential/netrc/git-credential-netrc.perl
  1. add login configuration to .netrc
r-brown / howto-install-jekyll_homebrew-rbenv.txt
Last active May 31, 2021
How to install Jekyll using Homebrew and rbenv
View howto-install-jekyll_homebrew-rbenv.txt
# install Homebrew
$ su ruby -e "$(curl -fsSL"
# show brew commands
$ brew help
# check current user
$ echo $(whoami)
# grant access to the folders
tzi / important.css
Created Jun 19, 2012
How to set an !important css property in javascript
View important.css
.test {
height: 139px;
width: 96px
tony-jones / package.json
Last active Aug 8, 2021
jekyll site: asset building using npm run-scripts
View package.json
"name": "jekyll-starter-kit",
"version": "1.0.0",
"description": "jekyll, asset build using npm scripts",
"main": "src/scripts/main.js",
"scripts": {
"eslint:dist": "eslint src/scripts/*.js",
"eslint": "npm run eslint:dist",
"uglify:dist": "uglify -s src/scripts/*.js -o dist/scripts/main.min.js",
"uglify:_site": "uglify -s src/scripts/*.js -o _site/dist/scripts/main.min.js",
View luna_pinyin.custom.yaml
# luna_pinyin.custom.yaml
# 修改字典名爲 luna_pinyin.kunki
# 其對應的用戶詞典名取句點之前部分即 luna_pinyin
translator/dictionary: luna_pinyin.kunki
cbilson / ob-powershell.el
Created Feb 6, 2018
Rough draft: execute poweshell from emacs src blocks
View ob-powershell.el
;;; ob-powershell.el --- org-babel functions for powershell evaluation
;; Authors: Chris Bilson
;; Keywords: literate programming, reproducible research
;; Homepage:
;;; Commentary:
;; Org-Babel support for evaluating powershell source code.
domenic /
Last active Sep 24, 2021
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with GitHub Actions

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons:

  • It is much easier and requires less steps, because you are already authenticated with GitHub, so you don't need to share secret keys across services like you do when coordinate Travis CI and GitHub.
  • It is free, with no quotas.
  • Anecdotally, builds are much faster with GitHub Actions than with Travis CI, especially in terms of time spent waiting for a builder.
zer4tul /
Last active Sep 28, 2021
Simplified Chinese edition of ESR's How To Become A Hacker