Skip to content

Instantly share code, notes, and snippets.

View shuxiao9058's full-sized avatar
:octocat:
Focusing

Aaron Ji shuxiao9058

:octocat:
Focusing
View GitHub Profile
@redguardtoo
redguardtoo / .emacs
Last active May 9, 2024 14:09
minimum emacs setup for Emacs plugin testing
;; A minimum .emacs to test Emacs plugins
(show-paren-mode 1)
(eval-when-compile (require 'cl))
;; test elisps download from internet here
(setq test-elisp-dir "~/test-elisp/")
(unless (file-exists-p (expand-file-name test-elisp-dir))
(make-directory (expand-file-name test-elisp-dir)))
(setq load-path
@tombigel
tombigel / README.md
Last active December 11, 2025 16:33 — forked from a2ikm/limit.maxfiles.plist
How to Change Open Files Limit on OS X and macOS Sierra (10.8 - 10.12)

How to Change Open Files Limit on OS X and macOS

This text is the section about OS X Yosemite (which also works for macOS Sierra) from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x

The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in Archive.org's Wayback Machine https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/

Mac OS X

To check the current limits on your Mac OS X system, run:

@rubencaro
rubencaro / setup_go.md
Last active April 28, 2024 21:52
Golang installation guide

Golang installation guide

Since Golang version 1.11 this process is finally (almost) as easy as it should (!!). You can see full docs here. For older guides see here.

These are my notes, not a generic solution. They are not meant to work anywhere outside my machines. Update version numbers to whatever are the current ones while you do this.

Installing everything needed the first time

Install asdf and its golang plugin, then install golang

@Wilfred
Wilfred / dashtest.el
Last active September 18, 2019 11:21
dolist vs mapcar
;;; dashtest.el --- benchmarking dash -*- lexical-binding: t -*-
(defmacro --map-mapcar (form list)
(declare (debug (form form)))
`(mapcar (lambda (it) ,form) ,list))
(defmacro --map-loop (form list)
(declare (debug (form form)))
(let ((result-sym (make-symbol "result")))
`(let (,result-sym)
@aatxe
aatxe / patch-multicolor-font.diff
Last active January 20, 2019 05:21
Patch for emacs macfont.m enabling multicolor font support.
diff --git a/src/macfont.m b/src/macfont.m
index 0445628..c9082a5 100644
--- a/src/macfont.m
+++ b/src/macfont.m
@@ -2373,9 +2373,9 @@ So we use CTFontDescriptorCreateMatchingFontDescriptor (no
!= (spacing >= FONT_SPACING_MONO)))
continue;
- /* Don't use a color bitmap font until it is supported on
- free platforms. */
http://invisible-island.net/xterm/
XTerm Control Sequences
Edward Moy
University of California, Berkeley
Revised by
@d12frosted
d12frosted / Tuto.md
Created October 10, 2016 12:40 — forked from yogsototh/Tuto.md
Starting Emacs in GUI with shell environment variables correctly set

Problem

When starting Emacs.app on Mac, the Emacs doesn't have some environment variable set correctly. Typically it is terrible when you use GPG, pinentry-mac, gpg-agent But also a lot of different variables used to make git works correctly, etc...

Solution

  1. Create the file ~/bin/init-app-env.sh:
@liweinan
liweinan / stitch.sh
Created September 27, 2016 15:50
pdf转png,拼长图工具
convert -density 100 in.pdf -background white -alpha remove out.png
convert -append `ls -1 *.png | sort -n | tr '\n' ' '` all.png
@HoLyVieR
HoLyVieR / hmac-crc.py
Last active December 24, 2019 07:23
HMAC-CRC Solution
#!/usr/bin/env python
"""
Utility fonction to convert from one form to an other
"""
def to_bits(length, N):
return [int(i) for i in bin(N)[2:].zfill(length)]
def from_bits(N):
return int("".join(str(i) for i in N), 2)
@ryerh
ryerh / tmux-cheatsheet.markdown
Last active December 23, 2025 14:25 — forked from MohamedAlaa/tmux-cheatsheet.markdown
Tmux 快捷键 & 速查表 & 简明教程

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

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

启动新会话:

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

恢复会话: