Skip to content

Instantly share code, notes, and snippets.

View mitizhi's full-sized avatar

Frans Oilinki mitizhi

  • Taipei, Taiwan
  • 03:40 (UTC +08:00)
View GitHub Profile
(defface tree-sitter-hl-face:warning
'((default :inherit font-lock-warning-face))
"Face for parser errors"
:group 'tree-sitter-hl-faces)
(defun hook/tree-sitter-common ()
(unless font-lock-defaults
(setq font-lock-defaults '(nil)))
(setq tree-sitter-hl-use-font-lock-keywords nil)
(tree-sitter-mode +1)
@LAK132
LAK132 / Makefile
Last active January 7, 2021 14:35
Makefile but it uses Tiny C Compiler to open an Xlib/GLX window
#if 0
ifneq ($(shell grep -a -h -i microsoft /proc/version),)
# // For use on Windows (WSL) with cygwinX
# // Requires xinit, xauth and xhost probably
# // Start the X11 server with `path\to\cygwin64\bin\run.exe --quote /usr/bin/bash.exe -l -c "cd; exec /usr/bin/startxwin -- +iglx -listen tcp"`
# // If you get "Authorization required, but no authorization protocol specified"
# // then try running `DISPLAY=:0.0 xhost +` in the cygwin terminal after
# // starting the X11 server.
DISPLAY = "`cat /etc/resolv.conf | grep nameserver | awk '{ print $$2 }'`:0.0"
LIBGLARGS = LIBGL_ALWAYS_INDIRECT=1 LIBGL_ALWAYS_SOFTWARE=1
@rougier
rougier / multiline-header.el
Created June 3, 2020 06:13
Emacs Multiline mode-line
;; -------------------------------------------------------------------
;; A proof of concept for a multi header or mode line
;;
;; Multi line header or mode line is made possible by generating an
;; SVG image made of two small lines of text. It is certainly memory
;; hungry but it seems to be fast enough to display line/column while
;; typing text. It can probably be extended in a number of ways.
;;
;; Feel free to modify it for your own needs.
;; -------------------------------------------------------------------
(require 'org)
(setq-default indent-tabs-mode nil)
(setq org-display-inline-images t)
(setq org-redisplay-inline-images t)
(setq org-startup-with-inline-images "inlineimages")
(setq default-frame-alist
(append (list '(width . 72) '(height . 40))))
(defun arrow-right-xpm (color1 color2)
"Return an XPM right arrow string representing."
(format "/* XPM */
static char * arrow_right[] = {
\"12 18 2 1\",
\". c %s\",
\" c %s\",
\". \",
\".. \",
\"... \",