Skip to content

Instantly share code, notes, and snippets.

Henrik Lissner hlissner

Block or report user

Report or block hlissner

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@hlissner
hlissner / custom-set-faces.el
Last active May 18, 2019
Convenience macro for additively setting face attributes in Doom Emacs
View custom-set-faces.el
(defmacro custom-set-faces! (&rest spec-groups)
"Convenience macro for additively setting face attributes.
SPEC-GROUPS is a list of either face specs, or alists mapping a package name to
a list of face specs. e.g.
(custom-set-faces!
(mode-line :foreground (doom-color 'blue))
(mode-line-buffer-id :foreground (doom-color 'fg) :background \"#000000\")
(mode-line-success-highlight :background (doom-color 'green))
@hlissner
hlissner / doom-persist-frame.el
Last active May 16, 2019
(Doom Emacs) Persists the Emacs' frame's dimensions, location and full-screen state across sessions
View doom-persist-frame.el
(when-let* ((dims (doom-cache-get 'last-frame-size)))
(cl-destructuring-bind ((left . top) width height fullscreen) dims
(setq initial-frame-alist
(append initial-frame-alist
`((left . ,left)
(top . ,top)
(width . ,width)
(height . ,height)
(fullscreen . ,fullscreen))))))
@hlissner
hlissner / setting-up-chemacs.org
Last active May 16, 2019
TL;DR for setting up Chemacs (particularly for Doom Emacs)
View setting-up-chemacs.org

Chemacs is a bootloader for Emacs. It makes it easy to switch between multiple Emacs configurations. To get it set up, start by deploying Doom somewhere:

git clone https://github.com/hlissner/doom-emacs ~/doom-emacs
~/doom-emacs/bin/doom quickstart

Then deploy Chemacs’ startup script in ~/.emacs.

@hlissner
hlissner / touch-bending.md
Created Apr 4, 2019
Some literature on touch-bending in Unity or HLSL
View touch-bending.md
@hlissner
hlissner / install-yay.sh
Created Apr 3, 2019
Install yay on Arch Linux
View install-yay.sh
if ! command -v yay >/dev/null; then
tmp=$(mktemp -d)
function finish { rm -rf "$tmp"; } # clean up after yourself...
trap finish EXIT # ...no matter how you exist
git clone https://aur.archlinux.org/yay.git "$tmp"
pushd "$tmp"
makepkg -sri --noconfirm --needed
popd
@hlissner
hlissner / hs-special-modes-alist.el
Created Jun 21, 2018
Adds hideshow folding rules for yaml-mode and ruby-mode
View hs-special-modes-alist.el
(defun +data-hideshow-forward-sexp (arg)
(let ((start (current-indentation)))
(forward-line)
(unless (= start (current-indentation))
(require 'evil-indent-plus)
(let ((range (evil-indent-plus--same-indent-range)))
(goto-char (cadr range))
(end-of-line)))))
(map-put hs-special-modes-alist
'yaml-mode
@hlissner
hlissner / install-pacaur.sh
Last active May 16, 2019
Install pacaur on Arch Linux
View install-pacaur.sh
if ! command -v pacaur >/dev/null; then
tmp=$(mktemp -d)
function finish {
rm -rf "$tmp"
}
trap finish EXIT
pushd $tmp
for pkg in cower pacaur; do
curl -o PKGBUILD https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=$pkg && \
View keybase.md

Keybase proof

I hereby claim:

  • I am hlissner on github.
  • I am hlissner (https://keybase.io/hlissner) on keybase.
  • I have a public key whose fingerprint is 0ABF F606 54D7 AEAF C9CC 27CE 5F6C 0EA1 6055 7395

To claim this, I am signing this object:

@hlissner
hlissner / git-gutter.el
Last active Jun 20, 2017
My Emacs git-gutter configuration, paraphrased
View git-gutter.el
(defconst doom-fringe-size '3 "Default fringe width")
;;; Setting up the fringe
;; switches order of fringe and margin
(setq-default fringes-outside-margins t)
;; standardize fringe width
(fringe-mode doom-fringe-size)
(push `(left-fringe . ,doom-fringe-size) default-frame-alist)
(push `(right-fringe . ,doom-fringe-size) default-frame-alist)
@hlissner
hlissner / codesign_gdb.md
Last active Jun 12, 2019
Codesign gdb on OSX
View codesign_gdb.md

Note: these instructions are for pre-Sierra MacOS. Sierra and newer users see https://gist.github.com/gravitylow/fb595186ce6068537a6e9da6d8b5b96d by @gravitylow.

If you are getting this in gdb on OSX while trying to run a program:

Unable to find Mach task port for process-id 57573: (os/kern) failure (0x5).
 (please check gdb is codesigned - see taskgated(8))
You can’t perform that action at this time.