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
#!/usr/bin/env sh | |
:; # -*- mode: emacs-lisp; lexical-binding: t -*- | |
:; # Checkout Github pull-request locally. | |
:; # Last-updated: 2022-11-14 13.42.02 +0800 | |
:; # by: Gong Qijian | |
:; # Usage: | |
:; # git-checkout-pr.sh [pull-request-url] | |
:; # Example: | |
:; # git-checkout-pr.sh https://github.com/user1/project2/pull/3 | |
:; # |
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
; $Id: helm-ls.el,v 1.4 2018/01/22 21:39:56 thierry Exp $ | |
(defvar helm-source-ls | |
(helm-build-async-source "ls" | |
:candidates-process (lambda () | |
(let* ((basedir (if (file-directory-p helm-pattern) | |
helm-pattern | |
(helm-basedir helm-pattern))) | |
(proc | |
(start-file-process "hls" nil "ls" |
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
(cl-defun custom-firefox-search-engine (&key | |
name | |
description | |
iconurl | |
searchurl | |
&allow-other-keys) | |
"Custom Firefox Search Engin. | |
NAME Short name of search engine | |
DESCRIPTION Description of search engine |
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 company-transformer//capf-dabbrev (candidates) | |
"Return different CANDIDATES depending on the point position. | |
| point at | company-capf | company-dabbrev | | |
|:---------|:------------:|:---------------:| | |
| foo.| | ✅ | ❌ | | |
| \"foo|\" | ❌ | ✅ | | |
| foo| | ✅ | ✅ | | |
Inspired by @yyjjl's [company//sort-by-tabnine](https://emacs-china.org/t/tabnine/9988/40) |
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
#!/usr/bin/env bash | |
set -e | |
# Emacs as pager | |
# | |
# Author: [email protected] | |
# Created: 2021-06-06 16.08.51 | |
# Version: 0.1 | |
# | |
# Installation: |
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
# coding: utf-8 | |
import os | |
#书籍信息 | |
title='test book' | |
creator='scturtle' | |
description='blablablabla' | |
#章节文件 | |
txtlist=['1.txt','2.txt'] |
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-lsp-jdtls-installation.el --- Test lsp jdtls installation -*- lexical-binding: t; -*- | |
;;; Date: 2020-05-11_09.12.50 | |
;;; Usage: | |
;; ┌──── | |
;; │ $ emacs -nw -Q -l \ | |
;; │ --eval '(setq with-proxy-http-server "127.0.0.1:XXXX")' \ | |
;; │ /path/to/test-lsp-jdtls-installation.el | |
;; └──── | |
(toggle-debug-on-error) | |
(setq user-emacs-directory (format "~/.emacs.d/%s/%s/" (file-name-base load-file-name) emacs-version)) |
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-nested-destructuring-in-dash-let.el --- Test nested destructuring in dash let form -*- lexical-binding: t; -*- | |
;; Author: Gong Qijian <[email protected]> | |
;; Created: 2020/04/09 | |
;; Version: 1.1 | |
;;; Commentary: | |
;; Example: | |
;; ┌──── | |
;; │ (-let [(&alist '(a "b" c) v) '((a . (("b" . ((c . 3))))))] v) | |
;; │ ;; => (let* ((v (cdr (assoc 'c | |
;; │ ;; (cdr (assoc "b" |
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-magit-stage-minimal.el --eval '(load-magit "/path/to/magit/lisp")' | |
;;; Created: 2020-03-04 03.05.24 | |
;;; Updated: 2020-03-04 21.17.19 | |
;;; Version: 2 | |
(toggle-debug-on-error) | |
;; ------------------------------------------------------------------ | |
;; elpa |
NewerOlder