To create an anchor to a heading in github flavored markdown.
Add - characters between each word in the heading and wrap the value in parens (#some-markdown-heading)
so your link should look like so:
[create an anchor](#anchors-in-markdown)
#!/usr/bin/env bash | |
# Use this one-liner to produce a JSON literal from the Git log: | |
git log \ | |
--pretty=format:'{%n "commit": "%H",%n "author": "%aN <%aE>",%n "date": "%ad",%n "message": "%f"%n},' \ | |
$@ | \ | |
perl -pe 'BEGIN{print "["}; END{print "]\n"}' | \ | |
perl -pe 's/},]/}]/' |
--- | |
layout: default | |
--- | |
<div class="blog-index"> | |
{% assign post = site.posts.first %} | |
{% assign content = post.content %} | |
{% include post_detail.html %} | |
</div> |
/* Font Awesome | |
the iconic font designed for use with Twitter Bootstrap | |
------------------------------------------------------- | |
The full suite of pictographic icons, examples, and documentation | |
can be found at: http://fortawesome.github.com/Font-Awesome/ | |
License | |
------------------------------------------------------- | |
The Font Awesome webfont, CSS, and LESS files are licensed under CC BY 3.0: | |
http://creativecommons.org/licenses/by/3.0/ A mention of |
(ns lorem-ipsum | |
(:require [clojure.string :as string])) | |
(def lorem-ipsum | |
"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?") | |
(def sentences | |
(string/split lorem-ipsum #"(?<=[.?]) ")) | |
(defn random-sen |
(defn filter-by-val-1 | |
[pred m] | |
(into {} (filter (fn [[k v]] (pred v)) | |
m))) | |
;; This one is a little faster | |
(defn filter-by-val-2 | |
[pred m] | |
(persistent! | |
(reduce-kv (fn [acc k v] |
(ns foo.core | |
(:refer-clojure :exclude [slurp])) | |
(defmacro slurp [file] | |
(clojure.core/slurp file)) | |
;; In CLJS | |
(ns bar.core | |
(:require [foo.core :include-macros true :refer [slurp]])) |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Angular JS</title> | |
</head> | |
<body ng-app="jsbin"> | |
<div ng-controller="DemoCtrl as demo"> | |
<h1>Hello {{demo.name}}</h1> | |
</div> |
(ns localstorage) | |
(defn set-item! | |
"Set `key' in browser's localStorage to `val`." | |
[key val] | |
(.setItem (.-localStorage js/window) key val)) | |
(defn get-item | |
"Returns value of `key' from browser's localStorage." | |
[key] |