Skip to content

Instantly share code, notes, and snippets.

@torinkwok
torinkwok / linum-highligth-current-line-number.el
Created July 19, 2016 10:27
Emacs: linum extension to highlight the current line number.
;; Copyright (C) 2014 Emanuele Tomasi <targzeta@gmail.com>
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@torinkwok
torinkwok / GuiKitsMainThreadGuard.m
Last active April 15, 2016 14:10 — forked from steipete/PSPDFUIKitMainThreadGuard.m
This is a guard that tracks down AppKit/UIKit access on threads other than main. This snippet is taken from the commercial iOS PDF framework http://pspdfkit.com, but relicensed under MIT. Works because a lot of calls internally call setNeedsDisplay or setNeedsLayout. Won't catch everything, but it's very lightweight and usually does the job.You …
// Taken from the commercial iOS PDF framework http://pspdfkit.com.
// Copyright (c) 2016 Tong Kuo. All rights reserved.
// Licensed under MIT (http://opensource.org/licenses/MIT)
// Copyright (c) 2014 Peter Steinberger, PSPDFKit GmbH. All rights reserved.
// Licensed under MIT (http://opensource.org/licenses/MIT)
//
#if !RELEASE