Skip to content

Instantly share code, notes, and snippets.

This wrapper is necessary to workaround the limitations of the =tramp-methods= specifications + the quirks of =tsh ssh=.
#+begin_src sh :tangle /sudo:root@localhost:/usr/local/bin/tsh-tramp-wrapper :tangle-mode (identity #o775)
#!/bin/sh
set -eu
TELEPORT_USER=$1
TELEPORT_NODE=$2
tsh ssh ${TELEPORT_USER}@${TELEPORT_NODE}
@dangirsh
dangirsh / key-chord-map.el
Created May 22, 2020 03:25
Combine key-chord.el with key maps to have many quick bindings in non-modal settings
(defun add-to-keymap (keymap bindings)
(dolist (binding bindings)
(define-key keymap (kbd (car binding)) (cdr binding))))
(defun add-to-dk-keymap (bindings)
(add-to-keymap dk-keymap bindings))
;; Example usage with dk and sl
### Keybase proof
I hereby claim:
* I am dangirsh on github.
* I am dangirsh (https://keybase.io/dangirsh) on keybase.
* I have a public key ASAS9-Ssxj4KgJIXm4J4EJ7emqR_A5j0Q4-ygqy3oxVMNwo
To claim this, I am signing this object:
@dangirsh
dangirsh / install.sh
Last active December 10, 2015 19:08 — forked from nickman/install.sh
#!/bin/bash
#######################################
# Graphite Install
# Run with sudo for best results
#
#######################################
if [[ "$(/usr/bin/whoami)" != "root" ]]; then
echo "This script must be run as root or using sudo.Script aborted."
exit 1
@dangirsh
dangirsh / configuration.nix
Created September 12, 2014 07:14
NixOS Config
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix