Skip to content

Instantly share code, notes, and snippets.

View yanli0303's full-sized avatar

Yan Li yanli0303

View GitHub Profile
@yanli0303
yanli0303 / swift-extension-default-implementation.swift
Last active July 25, 2018 15:51
Swift 4 extension default implementation vs. inheritance
import Cocoa
// see https://team.goodeggs.com/overriding-swift-protocol-extension-default-implementations-d005a4428bda
protocol ToString {
func toString() -> String
}
extension ToString {
@yanli0303
yanli0303 / static-analysis-test-report2.jelly
Created January 12, 2018 22:25
Jenkins HTML email template for testing result
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define">
<html>
<head>
<title>${project.name}</title>
<style>
body table, td, th, p, h1, h2 {
margin:0;
font:normal normal
100% Georgia, Serif;