Skip to content

Instantly share code, notes, and snippets.

Emacs isn't just an editor, it’s an entire Emacs Lisp interpreter and environment. We can use Emacs Lisp not only to extend and customize our beloved editor, but also to write entire programs and applications. Nic Ferrier’s [elnode][] server is the most ambitious Emacs Lisp application of this sort, but we can start at a smaller scale and try to write our shell scripts and tools with Emacs Lisp.

However, it turns out that writing programs in Emacs Lisp is more intricate than it looks at a first glance. Emacs decades-long history as interactive application have left deep marks in Emacs and Emacs Lisp, which make independent

@yegappan
yegappan / VimScriptForPythonDevelopers.MD
Last active April 5, 2025 09:17
Vim script for Python Developers

Vim Script for Python Developers

This is a guide to Vim Script development for Python developers. Sample code for the various expressions, statements, functions and programming constructs is shown in both Python and Vim Script. This is not intended to be a tutorial for developing Vim scripts. It is assumed that the reader is familiar with Python programming.

For an introduction to Vim Script development, refer to usr_41.txt, eval.txt and Learn Vimscript the Hard Way

For a guide similar to this one for JavaScript developers, refer to Vim Script for the JavaScripter

This guide only describes the programming constructs that are present in both Python and Vim. The constructs that are unique to Vim (e.g. autocommands, [key-mapping](https://vimhelp.org/map.txt.html#key-m

@TheBrokenRail
TheBrokenRail / build-tcc.sh
Created March 5, 2019 22:03
Build TinyCC
#!/bin/bash
set -e
PATH="$(pwd)/tinycc/temp:$(pwd)/tinycc/build/bin:$(pwd)/google-ndk:$(pwd)/google-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin:${PATH}"
if [[ -d tinycc ]]; then
rm -rf tinycc
fi
@fnky
fnky / ANSI.md
Last active April 18, 2025 14:14
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@seraphy
seraphy / certutil.md
Last active April 13, 2023 04:49
Windows標準コマンドCERTUTILの便利な補助機能を使った、ファイルのハッシュ値、HEXDUMP、BASE64の取得、およびWin32/HRESULTエラーコードの表示方法について。
: sd
#*TAG:39985 20:1973-09-17:0755:../d.proj-sd/sd
# Author: Brian Hiles <[email protected]>
# Date: 1998/11/20
# Description: sed debugger with conditional spypoints
# License: copyright (c) 1996-2002
# Name: sd
# Project: @(#)sd-standalone.sh 3.3 2001-04 [email protected] (Brian Hiles)
# Requires: echon(3S), expr(1), rm(1), sed(1)
# Thanks-to: Walter Briscoe <[email protected]> for AIX compatibility
@y2q-actionman
y2q-actionman / a_road_to_common_lisp_jp.md
Last active January 29, 2025 04:53
A Road to Common Lisp 翻訳

この文章は、 Steve Losh 氏の記事 "A Road to Common Lisp" の翻訳です。

原文はこちらです: http://stevelosh.com/blog/2018/08/a-road-to-common-lisp/


A Road to Common Lisp (Common Lisp への道)

これまで、「最近のCommon Lispをどう学ぶとよいでしょう?」と助言を求めるメールをたくさん受け取ってきました。そこで私は、これまでメールやソーシャルメディアに投稿した全てのアドバイスを書き下すことにしました。これが誰かに有益ならば幸いです。

@shafik
shafik / WhatIsStrictAliasingAndWhyDoWeCare.md
Last active April 18, 2025 07:17
What is Strict Aliasing and Why do we Care?

What is the Strict Aliasing Rule and Why do we care?

(OR Type Punning, Undefined Behavior and Alignment, Oh My!)

What is strict aliasing? First we will describe what is aliasing and then we can learn what being strict about it means.

In C and C++ aliasing has to do with what expression types we are allowed to access stored values through. In both C and C++ the standard specifies which expression types are allowed to alias which types. The compiler and optimizer are allowed to assume we follow the aliasing rules strictly, hence the term strict aliasing rule. If we attempt to access a value using a type not allowed it is classified as undefined behavior(UB). Once we have undefined behavior all bets are off, the results of our program are no longer reliable.

Unfortunately with strict aliasing violations, we will often obtain the results we expect, leaving the possibility the a future version of a compiler with a new optimization will break code we th

@k-takata
k-takata / 256colors2.bat
Last active August 4, 2024 17:33
Testing ANSI color sequence on Windows 10 and other terminal emulators
@echo off
rem Based on Todd Larason's 256color2.pl.
rem Ported to Windows 10's Command Prompt.
setlocal EnableDelayedExpansion
rem display the colors
rem first the system ones:
echo System colors:

General-purpose text preprocessing with the C preprocessor. Featuring JavaScript.

2017-02-15 Dariusz Jędrzejczak

http://djedr.github.io


Outline