Skip to content

Instantly share code, notes, and snippets.

@edgimar
edgimar / snmptrap_listener.py
Created Nov 24, 2020
Sample python3 code for listening to SNMP trap events
View snmptrap_listener.py
#!/usr/bin/env python3
"""
Heavily borrowed from https://stackoverflow.com/q/33752602
dependencies:
sudo apt install python3-pysnmp4 python3-pyasn1
To run:
View keybase.md

Keybase proof

I hereby claim:

  • I am edgimar on github.
  • I am edgimar (https://keybase.io/edgimar) on keybase.
  • I have a public key ASDAKMPAkiUDMROoRzqpEDKv0QXoNfHxKfkP4wTczlWIBAo

To claim this, I am signing this object:

@edgimar
edgimar / archive-with-ancestors.el
Last active Apr 11, 2021
Org-mode archive function that includes ancestor tree structure when copying
View archive-with-ancestors.el
(require 'org-archive)
; Set the function to use for org-archive-default (C-c C-x C-a)
; (setq org-archive-location (concat org-directory "/archive/%s_archive::"))
; (setq org-archive-location "archive/archived_%s::")
(setq org-archive-location "::* ARCHIVED")
; unmap org-archive-subtree
(define-key org-mode-map (kbd "C-c C-x C-s") nil)
@edgimar
edgimar / copy-org-mode-link.js
Last active Mar 22, 2021
User-script to copy the currently browsed web-page and selected content to the clipboard for pasting into org-mode
View copy-org-mode-link.js