Skip to content

Instantly share code, notes, and snippets.

View kidlj's full-sized avatar

Jian Li kidlj

View GitHub Profile
@kidlj
kidlj / client.go
Created April 24, 2019 13:05 — forked from spikebike/client.go
TLS server and client
package main
import (
"crypto/tls"
"crypto/x509"
"fmt"
"io"
"log"
)
# Thanks to Ethan Jucovy
# http://www.coactivate.org/projects/ejucovy/blog/2014/05/10/wagtail-notes-managing-redirects-as-pages/
# This model comes from wagtaildemo
class LinkFields(models.Model):
link_external = models.URLField("External link", blank=True)
link_page = models.ForeignKey(
'wagtailcore.Page',
null=True,
@kidlj
kidlj / gist.md
Last active April 12, 2016 12:01 — forked from benbalter/gist.md
在Github Pages页面里嵌入Gist.

在Markdown格式的文章中合适的地方插入如下代码:

{% gist 6558457 %}

其中{% gist GIST_ID %}是固定格式,你只需找到实际的Gist ID代替GIST_ID.

因为一个Gist可以有几个文件,还可以只嵌入某个Gist中的某个文件,如下: