Skip to content

Instantly share code, notes, and snippets.

View BlindingDark's full-sized avatar
🤘
🎧 🐈️

我没有抓狂 BlindingDark

🤘
🎧 🐈️
View GitHub Profile
@lilydjwg
lilydjwg / colors.py
Last active May 22, 2024 05:17
colors.py: show all kinds of terminal colors at a glance
#!/usr/bin/python3
from functools import partial
def colors16():
for bold in [0, 1]:
for i in range(30, 38):
for j in range(40, 48):
print(f'\x1b[{bold};{i};{j}m {bold};{i};{j} |\x1b[0m', end='')
print()
@young40
young40 / item2_open_file_in_emacs.sh
Created January 3, 2019 11:05
open file in Emacs or open it diectly
#!/bin/bash
# exec &> ~/logfile.txt
# In iTerm2 Session preferences <Advanced> pane setup Semantic History to:
#
# [Run coprocess...]
# ~/dot/item2_open_file_in_emacs.sh +\2 \1
if [[ $1 == "+" ]]; then
@takaxp
takaxp / example-setting-org-tempo.el
Created May 19, 2018 08:04
An example setting for org-tempo.el
(when (version< "9.1.4" (org-version))
(add-to-list 'org-modules 'org-tempo))
(add-to-list 'org-structure-template-alist
(if (version< "9.1.4" (org-version))
'(?S . "src emacs-lisp")
'("S" "#+BEGIN_SRC emacs-lisp\n?\n#+END_SRC" "<src lang=\"emacs-lisp\">\n\n</src>")))
@lotem
lotem / default.custom.yaml
Created July 9, 2012 12:23
自動識別西文及數字組成的用戶名
# default.custom.yaml
# 全局範圍識別輸入串爲 rime + 任意數字序列,以及形如 rimeime-1.2.3 的常用西文短語
# 也可將本組 patch 寫入 <輸入方案ID>.custom.yaml 使這組規則僅在一款輸入方案中有效
#
# 第一例,輸入 rime 之後,再輸入任意一個數字,則立即識別爲西文輸入
# 再加上 default.yaml 原有的 email 規則,識別包含 @ 字符的郵箱,於是可以一氣呵成 rime123@company.com
# 第二例,輸入到 rimeime 時,立即識別爲西文輸入,並可跟隨任意位數字及指定的符號
patch:
recognizer/patterns/rime123: "^rime[0-9]+$"