Skip to content

Instantly share code, notes, and snippets.

View incandescentman's full-sized avatar

Jay Dixit incandescentman

View GitHub Profile
;; [[elfeed:pragmaticemacs.com#http://pragmaticemacs.com/?p=752][A workflow to quickly add photos to org-mode notes]]
;; use case is taking a photo of a slide in a conference and uploading
;; it to syncthing and get it on your computer. You then want to embed
;; it in an org-mode document by moving it to the subfolder and
;; renaming according to the current section of the org file, avoiding
;; name clashes
;; required libraries
(require 'dash)
(require 'swiper)
@talwrii
talwrii / yas-edit.el
Created March 25, 2017 09:22
Start defining a snippet if it does not exist
;; yas-edit.el -- Quickly edit yas snippets
;; Copyright Tal Wrii (talwrii@gmail.com)
;; LICENSED UNDER GPLv3
(require 'yasnippet)
(defvar yas-edit-callback nil)
(defvar yas-edit-last nil "The last snippet expanded")
(defun yas-edit (prefix)
(interactive "P")
@zxaos
zxaos / Cycle Karabiner Elements Profiles.alfredworkflow
Last active June 7, 2017 18:37
Cycle Karabiner-Elements profiles with Alfred
@bradleybossard
bradleybossard / titleUrlMarkdownClip.js
Created December 5, 2015 21:09
Bookmarklet to copy current page title and url in Markdown format to clipboard, like [title](url) - Usual for posting links to resources in README.md files
javascript:(function() {
function copyToClipboard(text) {
if (window.clipboardData && window.clipboardData.setData) {
/*IE specific code path to prevent textarea being shown while dialog is visible.*/
return clipboardData.setData("Text", text);
} else if (document.queryCommandSupported && document.queryCommandSupported("copy")) {
var textarea = document.createElement("textarea");
textarea.textContent = text;
; The workflow is really simple: Open the pdf file with emacs using
; pdf-tools (instructions on that are below). If you see something
; noteworthy, just call M-x org-store-link (I have this set to C-c l),
; then paste it into your "paper-notes.org" file using
; M-x org-insert-link (set to C-c C-l on my machine). The link created
; thusly will contain the pdf file as well as the page number, so when
; you later open your paper-notes.org file and do C-c C-o, the pdf file
; will open at the correct page.
; Installation instructions:
(defun my/fix-space ()
"Delete all spaces and tabs around point, leaving one space except at the beginning of a line."
(interactive)
(just-one-space)
(when (looking-back "^[[:space:]]+") (delete-horizontal-space)))
(defun my/delete-backward ()
"When there is an active region, delete it and then fix up the whitespace."
(interactive)
(when (use-region-p)
@alphapapa
alphapapa / outline-mode-folding-python-elisp-shell.el
Created March 22, 2015 08:23
Emacs: outline-mode folding for Python, elisp, and shell
(defun my/python-mode-outline-hook ()
(setq outline-level 'my/python-outline-level)
(setq outline-regexp
(rx (or
;; Commented outline heading
(group
(* space) ; 0 or more spaces
(one-or-more (syntax comment-start))
(one-or-more space)
@simonmichael
simonmichael / init.el
Last active April 27, 2018 21:15
useful org-mode keybindings
; quick level-of-detail control for org (or orgstruct) mode
; M-N shows all nodes to depth N. M-0 shows all nodes and their content.
(eval-after-load "org" '(progn
(define-key org-mode-map "\M-1" (lambda () (interactive) (org-global-cycle 1)))
(define-key org-mode-map "\M-2" (lambda () (interactive) (org-global-cycle 2)))
(define-key org-mode-map "\M-3" (lambda () (interactive) (org-global-cycle 3)))
(define-key org-mode-map "\M-4" (lambda () (interactive) (org-global-cycle 4)))
(define-key org-mode-map "\M-5" (lambda () (interactive) (org-global-cycle 5)))
(define-key org-mode-map "\M-6" (lambda () (interactive) (org-global-cycle 6)))
(define-key org-mode-map "\M-7" (lambda () (interactive) (org-global-cycle 7)))
@jsomers
jsomers / websters-chrome.md
Created November 10, 2014 14:20
Adding Webster's as a Chrome search engine

Instructions courtesy of @chancelionheart:

  1. Access the Settings menu by clicking the Options icon in the upper-right corner of the browser window. It is the icon with three horizontal lines stacked on top of each other. Click on “Settings” near the bottom of the Options menu.

  2. Under the “Search” heading in the Settings menu, click the "Manage search engines" button.

  3. At the bottom of the Search Engines window that comes up, enter the following: Name: Use whatever you like (I used "Webster's Revised 1913+1928 Dictionary") Keyword: Also whatever you like, I just use 'd' for easy access. Url: http://machaut.uchicago.edu/?resource=Webster%27s&word=%s&use1913=on&use1828=on (replaces the search term with %s, what google chrome uses for the query)

Note

This is my dot-file, therefore it’s prone to have broken-ness in it. I’m trying to clean it up and make sure it’s sane.

Things currently not the way i’d like

  • escreen is nice, but i have to init it each time and set it up to use it… i’d like a working revive+ config, but I haven’t gotten it working correctly yet. see my twittering section for an example of how i use excreen