This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro value-bound-lambda (args symbols &rest body) | |
"Returns a lambda expression with ARGS, where each symbol in SYMBOLS is | |
available for use and is bound to it's value at creation. | |
Symbols needs to be a list of variables or functions available globally." | |
(declare (indent defun)) | |
(let ((vars (remove-if-not 'boundp symbols)) | |
(funcs (remove-if-not 'functionp symbols))) | |
`(lambda ,args | |
(let ,(mapcar (lambda (sym) (list sym (symbol-value sym))) vars) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM launcher.gcr.io/google/debian9:latest | |
RUN apt-get update && apt-get install -y gnupg wget software-properties-common | |
RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - | |
RUN apt-add-repository "deb http://apt.llvm.org/stretch/ llvm-toolchain-stretch-6.0 main" | |
RUN apt-get update && apt-get install -y clang-6.0 | |
RUN apt-get -y install libclang-common-6.0-dev libclang-6.0-dev libclang1-6.0 libllvm6.0 llvm-6.0-dev | |
## ISSUE: | |
# CMake Error at /usr/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:138 (message): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; test-fibonacci.el --- Test fibonacci -*- lexical-binding: t; -*- | |
;;; Usage: /path/to/emacs --batch -l /path/to/test-fibonacci.el | |
;;; Date: 2018-05-08_11.32.38 | |
(require 'generator) | |
;;; utils | |
(defmacro with-time-elapse (&rest BODY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; Date: 2017-12-28_23.12.21 | |
;;; Usage: | |
;; $ /path/to/emacs -nw -Q -l /path/to/test-helm-ff-boring-files-filtering.el | |
;; or | |
;; $ /path/to/emacs --batch -l /path/to/test-helm-ff-boring-files-filtering.el | |
(toggle-debug-on-error) | |
(global-set-key (kbd "C-h") 'delete-backward-char) | |
(global-set-key (kbd "M-h") 'backward-kill-word) | |
(global-set-key (kbd "<f1>") 'help-command) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun format-spec+ (fmt specs) | |
(with-temp-buffer | |
(insert fmt) | |
(goto-char (point-max)) | |
(let ((objs '())) | |
(while (re-search-backward "%\\([-0-9\\-\\.]*\\){\\([^}]+\\)}\\([a-zA-Z]\\)" nil t) | |
(let ((num (match-string 1)) | |
(var (match-string 2)) | |
(typ (match-string 3))) | |
(replace-match (concat "%" num typ)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; Reproduce the issue https://github.com/emacs-lsp/lsp-mode/issues/295 | |
;;; Usage: /path/to/emacs -nw -Q -l /path/to/test-lsp-mode-issue295.el | |
;;; Date: 2018-02-27_23.24.41 | |
(toggle-debug-on-error) | |
;; ------------------------------------------------------------------ | |
(setq user-emacs-directory (format "~/.emacs.d/%s/%s/" (file-name-base load-file-name) emacs-version)) | |
(setq package-user-dir (concat user-emacs-directory "elpa/")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## | |
# Add shadow to image | |
# @author gongqijian@gmail.com | |
# @date 2014-11-22 | |
## | |
usage() { | |
app=$(basename $0) | |
cat <<EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; Usage: /path/to/emacs -nw -Q -l /path/to/test-lsp-flycheck.el | |
;;; Date: 2018-01-09_14.09.39 | |
(toggle-debug-on-error) | |
(global-set-key (kbd "C-h") 'delete-backward-char) | |
(global-set-key (kbd "M-h") 'backward-kill-word) | |
(global-set-key (kbd "<f1>") 'help-command) | |
(define-key isearch-mode-map "\C-h" 'isearch-delete-char) | |
;; ------------------------------------------------------------------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; Usage: /path/to/emacs -Q -l /path/to/test-lsp-ui.el | |
;;; Date: 2018-01-03_09.07.11 | |
(toggle-debug-on-error) | |
(global-set-key (kbd "C-h") 'delete-backward-char) | |
(global-set-key (kbd "M-h") 'backward-kill-word) | |
(global-set-key (kbd "<f1>") 'help-command) | |
(define-key isearch-mode-map "\C-h" 'isearch-delete-char) | |
(unless (display-graphic-p) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; Usage: /path/to/emacs -nw -Q -l /path/to/test-ivy-read.el | |
(toggle-debug-on-error) | |
(global-set-key (kbd "C-h") 'delete-backward-char) | |
(global-set-key (kbd "M-h") 'backward-kill-word) | |
(global-set-key (kbd "<f1>") 'help-command) | |
(define-key isearch-mode-map "\C-h" 'isearch-delete-char) | |
;; ------------------------------------------------------------------ |