Skip to content

Instantly share code, notes, and snippets.

@simecek
simecek / diffusers_demo.ipynb
Created September 6, 2022 20:01
diffusers_demo.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tttuuu888
tttuuu888 / package-loading-notice.el
Last active June 6, 2021 02:57
Eye-candy for Emacs package loading time
(defvar sk-package-loading-notice-list '(org yasnippet))
(defun sk-package-loading-notice (old &rest r)
(let* ((elt (car r))
(mode
(when (stringp elt)
(let ((ret (assoc-default elt auto-mode-alist 'string-match)))
(and (symbolp ret) (symbol-name ret)))))
(pkg
(cond ((symbolp elt) elt)
@mehmetahsen
mehmetahsen / telegram.sh
Created May 7, 2021 20:46
Poor man's Telegram notifier
#!/bin/bash
# Bash Import/Source script
# Prints/Sends start/error/end messages
set -o pipefail
set -o errtrace
# Have below variables set
TELEGRAM_BOT_TOKEN=''
TELEGRAM_CHAT_ID=''
@AloisJanicek
AloisJanicek / org-protocol-to-wsl-emacs.reg
Created November 29, 2020 22:44
Org-protocol setup with emacs inside WSL
REGEDIT4
[HKEY_CLASSES_ROOT\org-protocol]
@="URL:Org Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\org-protocol\shell]
[HKEY_CLASSES_ROOT\org-protocol\shell\open]
[HKEY_CLASSES_ROOT\org-protocol\shell\open\command]
@="\"C:\\BIN\\org-protocol-to-wsl-helper.bat\" \"%1\""
@minad
minad / polyp.md
Last active February 9, 2024 10:51
Polyp: Small child of the Hydra

Polyp: Small child of the Hydra

;; The undo keybindings `C-x u` and `C-_` enter the polyp.
(defpolyp polyp-undo
  "_u_ndo  _r_edo"
  ("u" undo-fu-only-undo "C-x u" "C-_")
  ("r" undo-fu-only-redo))
@etyurkin
etyurkin / tree.el
Last active January 17, 2022 04:07
Emacs frontend for unix "tree" command
(require 'json)
(defvar tree-mode-map
(let ((map (make-sparse-keymap)))
(define-key map "v" 'kwarks/tree-view-file)
(define-key map "o" 'kwarks/tree-find-file)
(define-key map (kbd "RET") 'kwarks/tree-find-file)
(define-key map "c" 'kwarks/tree-copy-node-path)
(define-key map "s" 'kwarks/tree-subtree)
(define-key map "r" 'kwarks/tree-reload)
@abrochard
abrochard / presentation.org
Last active May 5, 2024 04:53
Notes from the "Conquering Kubernetes with Emacs" presentation

Conquering Kubernetes with Emacs

Specific Annoying workflow

Listing pods with kubectl get pods, then select a pod name and copy paste it into kubectl logs [pod name]

Why?

  • I want to streamline my workflow and stop using the terminal
  • learn more about kubernetes
  • main kubernetes extension for Emacs out there is greedy for permissions
#!/usr/bin/env zsh
# _ _
# __ _| | _____ _ _ ___ _______| |__
# \ \/ / |/ / _ \ | | / __| |_ / __| '_ \
# > <| < __/ |_| \__ \_ / /\__ \ | | |
# /_/\_\_|\_\___|\__, |___(_)___|___/_| |_|
# |___/
last_class="none"
current_map=default
@cengiz-io
cengiz-io / 99-disable-wireless-when-wired
Last active October 9, 2023 16:36
Script should be placed under `/etc/NetworkManager/dispatcher.d/` with a name like `99-disable-wireless-when-wired`. Make sure 1) root owns it 2) it's mod is 755
#!/bin/sh
IFACE=$1
ACTION=$2
ntfy () {
sudo -u cengiz \
DISPLAY=:0 \
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus \
notify-send "$1" "$2"
@stevenringo
stevenringo / reinvent-2017-youtube.md
Created December 3, 2017 23:01
Links to YouTube recordings of AWS re:Invent 2017 sessions

| Title | Description