Skip to content

Instantly share code, notes, and snippets.

View colin4124's full-sized avatar
🐛
Suck.

Leway Colin colin4124

🐛
Suck.
View GitHub Profile
@rougier
rougier / nano.el
Created February 4, 2025 18:48
NANO Emacs (minimal version: 256 lines)
;; nano-emacs.el --- NANO Emacs (minimal version) -*- lexical-binding: t -*-
;; Copyright (c) 2025 Nicolas P. Rougier
;; Released under the GNU General Public License 3.0
;; Author: Nicolas P. Rougier <nicolas.rougier@inria.fr>
;; URL: https://github.com/rougier/nano-emacs
;; This is NANO Emacs in 256 lines, without any dependency
;; Usage (command line): emacs -Q -l nano.el -[light|dark]
@abidanBrito
abidanBrito / build-emacs.sh
Last active September 17, 2025 06:06
Build GNU Emacs from source.
#!/usr/bin/env bash
## Author: Abidán Brito
## This script builds GNU Emacs 29.1 with support for native elisp compilation,
## tree-sitter, libjansson (C JSON library), pure GTK and mailutils.
# Exit on error and print out commands before executing them.
set -euxo pipefail
# Let's set the number of jobs to something reasonable; keep 2 cores
@gxfxyz
gxfxyz / karabiner_capslock_control_tab.json
Created May 19, 2019 15:49
Karabiner-Elements config: CapsLock / Control / Tab
{
"title": "CapsLock / Control / Tab",
"rules": [
{
"description": "Tap CapsLock (⇪) → Escape (⎋); Hold CapsLock (⇪) → Control (⌃)",
"manipulators": [
{
"from": {
"key_code": "caps_lock",
"modifiers": {
@sbcd90
sbcd90 / ReflectionTestApp.scala
Created April 1, 2017 00:54
Fun with scala reflection & toolbox api
package com.sap.app
import scala.reflect.runtime._
import scala.reflect.runtime.universe._
import scala.tools.reflect.ToolBox
object ReflectionTestApp extends App {
val cm = universe.runtimeMirror(getClass.getClassLoader)
val toolBox = cm.mkToolBox()
@gumblex
gumblex / ansi_mandelbrot.py
Created May 5, 2016 05:57
Mandelbrot ASCII art from PyPy (independent version)
import os
import sys
import colorsys
"""
Black 0;30 Dark Gray 1;30
Blue 0;34 Light Blue 1;34
Green 0;32 Light Green 1;32
Cyan 0;36 Light Cyan 1;36
Red 0;31 Light Red 1;31
@ryerh
ryerh / tmux-cheatsheet.markdown
Last active December 7, 2025 21:06 — forked from MohamedAlaa/tmux-cheatsheet.markdown
Tmux 快捷键 & 速查表 & 简明教程

注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件管理在低版本可能会与本文不兼容。

Tmux 快捷键 & 速查表 & 简明教程

启动新会话:

tmux [new -s 会话名 -n 窗口名]

恢复会话:

@nauhygon
nauhygon / Build Emacs for Windows 64bit with Native Compilation.md
Last active August 14, 2025 21:51
Step-by-step instructions to build Emacs for Windows 64 bit with MSYS2 and MinGW-w64. Now `native-comp` supported.

Build Emacs-w64 with MSYS2/MinGW-w64 with Native Compilation

Instructions are modified from emacs-w64 Wiki page by zklhp. Many thanks for sharing!

  1. Download the latest MSYS2 from this download page.

  2. Install MSYS2 to, for example, C:\msys2 (make sure no space in path to avoid unwanted problems).

  3. Optionally prettify the MSYS2 console mintty with ~/.minttyrc to make it more pleasing to eyes. Thanks to this awesome theme!

@XVilka
XVilka / TrueColour.md
Last active November 27, 2025 14:11
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@retronym
retronym / sealed-subclass-copier.scala
Created April 13, 2013 11:11
sealed subclass copier
scala> object O {
| sealed abstract class Base;
| case class Foo(id: Int, b: String) extends Base
| case class Bar(id: Int, b: Boolean) extends Base
| }
defined module O
scala> import O._
import O._
@dsc8x
dsc8x / Monaco_Linux-Powerline.ttf
Created January 18, 2012 17:19
Monaco for vim-powerline