Skip to content

Instantly share code, notes, and snippets.

(require 'tramp)
(add-to-list 'file-name-handler-alist '("\\`/home/shkoo/devdir/" . shkoo-dev-file-handler))
(add-to-list 'file-name-handler-alist '("\\`~/devdir/" . shkoo-dev-file-handler))
(defun shkoo-dev-make-process (&rest args)
(when args
(let ((default-directory tramp-compat-temporary-file-directory)
(name (plist-get args :name))
(buffer (plist-get args :buffer))
(command (plist-get args :command))
@magicdude4eva
magicdude4eva / zsh-syntax-highlighting paste performance improvement
Last active September 4, 2024 03:41
zsh-syntax-highlighting paste performance improvement
Add the following in .zshrc:
...
plugins=(osx git zsh-autosuggestions zsh-syntax-highlighting zsh-nvm docker kubectl)
...
### Fix slowness of pastes with zsh-syntax-highlighting.zsh
pasteinit() {
OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]}
zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`?
@alexellis
alexellis / arm.md
Last active May 28, 2024 14:48
Test swarm connectivity

Regular PC / cloud architecture (64-bit)

See the snippets "guide.md" and "redis.md" below.

Swarm on a Raspberry Pi

If you're wanting to run Docker Swarm on your Raspberry Pi checkout these instructions:

@ericclemmons
ericclemmons / example.md
Last active September 20, 2024 12:46
HTML5 <details> in GitHub

Using <details> in GitHub

Suppose you're opening an issue and there's a lot noisey logs that may be useful.

Rather than wrecking readability, wrap it in a <details> tag!

<details>
 Summary Goes Here
@tzz
tzz / gist:e7829d0ea6e52a2daec9
Last active October 20, 2015 15:26
mapdata() example with CFEngine
bundle agent main
{
methods:
"test";
vars:
"test_state" data => bundlestate(test);
"test_string" string => storejson(test_state);
reports:
@afair
afair / tmux.cheat
Last active June 3, 2024 23:26
Tmux Quick Reference & Cheat sheet - 2 column format for less scrolling!
========================================== ==========================================
TMUX COMMAND WINDOW (TAB)
========================================== ==========================================
List tmux ls List ^b w
New new -s <session> Create ^b c
Attach att -t <session> Rename ^b , <name>
Rename rename-session -t <old> <new> Last ^b l (lower-L)
Kill kill-session -t <session> Close ^b &
@spicycode
spicycode / tmux.conf
Created September 20, 2011 16:43
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000