Skip to content

Instantly share code, notes, and snippets.

View mplscorwin's full-sized avatar
💬
preping for EmacsConf.org

Corwin mplscorwin

💬
preping for EmacsConf.org
View GitHub Profile
@assodefis
assodefis / cloudflare-pve-acme.sh
Last active August 8, 2021 19:41 — forked from fuyuanli/cloudflare-pve-acme.sh
acme.sh + Proxmox VE
# CloudFlare API
#
# Please install "acme.sh" before runnung this script.
# curl https://get.acme.sh/ | sh
#
export CF_Email="Your_CloudFlare_Account@example.com"
export CF_Key="Your_CloudFlare_API_Key"
/root/.acme.sh/acme.sh --issue \
-d $DOMAIN \
@trishume
trishume / etrace.el
Last active October 25, 2020 21:43
See new Github Repo version: https://github.com/aspiers/etrace - Emacs Latency Tracing for the Chromium Catapult Trace Event Format.
;; This gist has been superseded by a Github repo, new activity will
;; happen at https://github.com/aspiers/etrace
;;; etrace.el --- Emacs Lisp Tracer -*- lexical-binding: t -*-
;; Released under the MIT license, Copyright Jane Street Group, LLC
;; This module modifies the instrumentation profiler included with
;; Emacs called "elp" to also record trace events for the beginning
;; and end of function calls, and provides a function to write out
;; those events in Chromium JSON trace format.
;;
@equwal
equwal / fonts.el
Last active September 21, 2020 21:07
Selecting and trying out different fonts in Emacs.
;;; TL;DR
(set-face-attribute 'default nil :family "Hack");Must be the FULL name (search-fonts "Hack") for it.
(set-face-attribute 'default nil :height (* 13 10));13pt
;;; Also see: https://github.com/alphapapa/unpackaged.el#font-compare
;;; to easily compare lots of fonts.
;;; The purpose of this Gist is to help you select a font you like by trying it out in Emacs.
;;; Here is my custom Hack font: https://github.com/equwal/alt-hack0
;;; If you don't have the fonts, you can try:
;;; - Your package manager
@fnky
fnky / ANSI.md
Last active May 11, 2024 13:38
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@kobapan
kobapan / scratch.el
Last active January 16, 2023 08:41
elisp *scratch* の永続化
(setq initial-scratch-message "") ; とりあえず initial message を消す
(add-hook 'kill-emacs-hook 'scratch-save) ; Emacs終了時に *scratch* を保存
(add-hook 'window-setup-hook 'scratch-resume); 起動時に.scratchを読み込み
;; window-setup-hook が最後に呼ばれるっぽい
;; @see info 38.1.1 Summary: Sequence of Actions at Startup
(add-hook 'kill-buffer-hook; *scratch* バッファで kill-buffer したら内容を保存
(lambda () (if (equal (buffer-name) "*scratch*") (scratch-save))))
(add-hook 'after-save-hook ; *scratch*をファイル保存したら、*scratch*復帰
(lambda () (unless (get-buffer "*scratch*") (scratch-resume))))
(defvar scratch-file "~/.emacs.d/.scratch")
@avli
avli / gnus.el
Last active January 26, 2020 03:29
Simple Gnus configuration for reading Gmane
(setq gnus-select-method '(nntp "news.gmane.org"))
(setq gnus-thread-sort-functions
'(gnus-thread-sort-by-most-recent-number
gnus-thread-sort-by-subject
(not gnus-thread-sort-by-total-score)
gnus-thread-sort-by-most-recent-date))
(setq-default
gnus-summary-line-format "%U%R%d %-5,5L %-20,20n %B%-80,80S\n"
@garlandkr
garlandkr / statsd_init.sh
Created August 29, 2012 16:39
statsd init.d script with forever nodejs support
#!/bin/sh
### BEGIN INIT INFO
# Provides: statsd
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the statsd node server
# Description: starts statsd using nodejs forever
@robspassky
robspassky / inetd_www.bash
Created March 2, 2012 15:59
bash shell script to serve an http request via inetd
#!/bin/bash
#
# Shell script usable as web "server"
# Code mostly copied from web, my contribution was to add the sanitation.
#
###
### PARSE THE REQUEST
###
@GregMefford
GregMefford / setup-statsd-centos.sh
Last active April 10, 2022 15:31 — forked from collegeman/setup-statsd.sh
Install Graphite and StatsD on CentOS (updated for 6.4 x86_64)
# First do a fresh install of CentOS 5.7 i386, server configuration (no GUI)
# This should be performed as root since it's going to be installing a bunch of stuff
# --- Update things to make sure we have the latest patches ---
# Add EPEL so we can get reasonably recent packages
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
# --- Install all the packages --- #
yum -y install python-whisper python-carbon graphite-web python-memcached python-ldap httpd memcached
(defun perltidy ()
(interactive)
(save-excursion
(mark-whole-buffer)
(shell-command-on-region (point) (mark) "perltidy -q" nil t)
(message "Tidied")))
(global-set-key "\C-c t" 'perltidy)