Skip to content

Instantly share code, notes, and snippets.

View Kungsgeten's full-sized avatar

Erik Sjöstrand Kungsgeten

View GitHub Profile
@Kungsgeten
Kungsgeten / brain.css
Created June 23, 2019 17:57
org-brain HTML export
.org-brain-entry {
border-radius: 25px;
background: #73ad21;
padding: 20px;
padding-top: 7px;
margin: 10px;
}
.org-brain-entry h1 {
margin: 0;
padding: 0;
@Kungsgeten
Kungsgeten / suitsymbols.gs
Last active June 21, 2019 09:53
Colored suit symbols in Google Docs
function replaceStringAndSetColor(body, str, replacement, color) {
var foundElement = body.findText(str);
while (foundElement != null) {
var foundText = foundElement.getElement().asText();
var start = foundElement.getStartOffset();
var end = foundElement.getEndOffsetInclusive();
foundText.setForegroundColor(start, end, color);
foundElement = body.findText(str, foundElement);
}
body.replaceText(str, replacement);

Kakmacs

Introduction

Setup

Dependencies

These aren’t all dependencies, but only the ones which isn’t loaded by my usual init-file.

@Kungsgeten
Kungsgeten / kungsgeten_ryo.el
Created January 9, 2017 08:47
My ryo-mode config
;;* Helper functions
;; Taken from http://endlessparentheses.com/emacs-narrow-or-widen-dwim.html
(defun narrow-or-widen-dwim (p)
"Widen if buffer is narrowed, narrow-dwim otherwise.
Dwim means: region, org-src-block, org-subtree, or
defun, whichever applies first. Narrowing to
org-src-block actually calls `org-edit-src-code'.
With prefix P, don't widen, just narrow even if buffer