Skip to content

Instantly share code, notes, and snippets.

View sebasmonia's full-sized avatar

Sebastián Monía sebasmonia

View GitHub Profile
package main
import (
"encoding/json"
"fmt"
)
func main() {
b := []byte(`{"key":"value"}`)
@sebasmonia
sebasmonia / toggle-backslash.el
Last active November 7, 2023 16:25 — forked from dov/toggle-backslash.el
Toggle between backslashes and forward slashes
(defun toggle-backslash-dwim (&optional start end)
"Toggle slashes-backslashes for the active region.
If there's no active region START and END, it operates on the
current line."
(interactive "r")
(save-excursion
(unless (use-region-p)
(cl-destructuring-bind (a . b)
(bounds-of-thing-at-point 'line)
(setf start a