Skip to content

Instantly share code, notes, and snippets.

View Nidish96's full-sized avatar

Nidish Narayanaa Balaji Nidish96

View GitHub Profile
@Nidish96
Nidish96 / org-dl-scr.el
Last active September 12, 2024 07:36
Interactive screenshot saving with org-download-screenshot
;; Usage:
;; 1. Call timed-screenshot
;; 2. Enter a delay time in seconds. I recommend 2.
;; 3. Navigate "out" of emacs into the pdf or web page you want to screenshot and wait for the timeout to end.
;; 4. The screenshot utility will be triggered automatically. You can customize `org-download-screenshot-method` for this.
;; 5. Take the screenshot.
;; 6. Navigate back to emacs. A minibuffer prompt asking you to enter a filename will be waiting for you.
;; 7. Enter a filename relative to current directory and hit enter.
;;
;; Credits: @mmonga@mathstodon.xyz for spurring this. Original Thread: https://mathstodon.xyz/@mmonga/113118159165252806
@Nidish96
Nidish96 / org-capture-local.el
Last active November 13, 2023 10:29
An Org-capture template to enable maintaining a directory-local notes file for notes that can be shared/version controlled with a project.
(setq org-default-notes-file (concat org-directory "/notes.org"))
(defvar org-local-notes-file)
(defun my/org-local-get-target ()
(if (boundp 'org-local-notes-file)
(expand-file-name org-local-notes-file)
(if (y-or-n-p "A local org note doesn't exist. Create/choose one? ")
(progn
(add-dir-local-variable
nil 'org-local-notes-file
@Nidish96
Nidish96 / ReadAbaqusMtx.sh
Last active September 11, 2018 22:12
A short bash script (with a Python here doc) to extract matrices from an abaqus mtx file. The test case for this is a substructure matrix output analysis outputting the mass, stiffness and some recovery matrix rows. It assumes the matrix storage to be in dense symmetric form. Avoided unnecessary conditionals for readability. Hope it helps someon…
#!/bin/sh
if [ $# = 1 ]
then
echo "Correct call!"
else
echo "Wrong call - quitting!"
return
fi
echo "Preprocessing mtx files"
@Nidish96
Nidish96 / sow.el
Last active February 20, 2017 14:03 — forked from politza/scroll-other-window.el
scroll-other-window.el
;;; sow.el --- Variable commands for scrolling the other window.
;; Copyright (C) 2016 Andreas Politz
;; Author: Andreas Politz <politza@fh-trier.de>
;; Keywords: extensions, frames
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or