Skip to content

Instantly share code, notes, and snippets.

Value: [((id . 144585)
(self . "https://jira.atl.workiva.net/rest/api/2/issue/INFENG-3775/remotelink/144585")
(application)
(object
(url . "https://github.com/Workiva/harbour-registrator/pull/26")
(title . "Workiva/harbour-registrator: master PR:")
(summary . " Open - INFENG-3775 fixed healthchecker shutudown bug")
(icon
(url16x16 . "https://w-rmconsole.appspot.com/static/img/gh_link_open.png"))
(status

org-ls-jira-fetch-issue

(defun org-ls-jira-fetch-issue (id)
  (setq org-ls-jira-last-issue nil)
  (-when-let (url (org-ls-jira-rest-url id))
    (org-ls-chrome-open url)
    (org-ls-chrome-wait)
    (-when-let* ((selector "document.querySelector('pre').innerHTML")
                 (text (org-ls-chrome-select selector))
                 (issue (json-read-from-string text)))
**** hydra-aws-account
#+begin_src emacs-lisp
(defun hydra-aws-account--set-account (account)
'(lambda () (interactive)
(message "WTF")
(hydra-aws/body)
(setq org-ls-aws--current-account account)))
(defhydra hydra-aws-account
(:hint nil :color red)
#+TITLE: init.el
#+AUTHOR: you
#+email: you
#+DESCRIPTION: A literate programming style exposition of my Emacs configuration
#+LANGUAGE: en
#+STARTUP: overview indent align
#+BABEL: :cache no
#+OPTIONS: ^:nil num:nil tags:nil
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="https://www.pirilampo.org/styles/readtheorg/css/htmlize.css"/>
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="https://www.pirilampo.org/styles/readtheorg/css/readtheorg.css"/>
(defun org-ls-aws-goto (service &optional region account)
(when account
(org-ls-aws-login account))
(org-ls-aws-open service region)
(org-ls-chrome-wait)
(org-ls-dock-activate "Google Chrome"))
(defun org-life-do (name &rest args)
(with-temp-buffer
(insert-file-contents org-life-support-file-name)
(org-babel-goto-named-src-block name)
(let ((info (org-babel-get-src-block-info)))
(dotimes (i (length args))
(let* ((params (third info))
(vars (org-life-get-val-props params))
(arg (elt args i))
(index (make-symbol (format "%s" i))))
#+begin_src emacs-lisp
(defun org-babel-execute:apples (body params)
"Execute a block of Foma code with org-babel."
(message "executing applescript source code block")
(message (cddr (third (first params))))
(do-applescript body))
#+end_src
#+begin_src elisp :var app="Google Chrome" foo="bar"
tell application app to open "http://bing.com"
(defun jira-issue-query (id &rest args)
(--when-let (jira-fetch-issue id)
(apply 'jq (cons id args))))
(jira-issue-query issue-id 'fields 'updated)
(defhydra hydra-aws-saml (:hint nil :color blue)
"
╭──────────┐
Account │ AWS SAML │
╭────────────────┴──────────╯
[_d_] dev
[_p_] prod
[_c_] corp
_<f19>_ to close
─────────────────────────────

extract-src-content

(defun extract-src-content (name)
  (save-excursion
    (org-babel-goto-named-src-block name)
    (org-element-property :value (org-element-at-point))))

execute-as-block