(setq org-catch-invisible-edits 'smart)
#+END_SRC
+** underscore in export
+[2016-10-28 Fri 12:08]
+
+#+BEGIN_SRC emacs-lisp
+ (setq org-export-with-sub-superscripts nil)
+#+END_SRC
+
+** css style html export
+[2016-10-28 Fri 12:21]
+
+run =toggle-org-custom-inline-style= in a org buffer associated with a
+file.
+
+#+BEGIN_SRC emacs-lisp
+ ;; put your css files there
+ (defvar org-theme-css-dir "~/.emacs.d/org-css/")
+
+ (defun toggle-org-custom-inline-style ()
+ (interactive)
+ (let ((hook 'org-export-before-parsing-hook)
+ (fun 'set-org-html-style))
+ (if (memq fun (eval hook))
+ (progn
+ (remove-hook hook fun 'buffer-local)
+ (message "Removed %s from %s" (symbol-name fun) (symbol-name hook)))
+ (add-hook hook fun nil 'buffer-local)
+ (message "Added %s to %s" (symbol-name fun) (symbol-name hook)))))
+
+ (defun org-theme ()
+ (interactive)
+ (let* ((cssdir org-theme-css-dir)
+ (css-choices (directory-files cssdir nil ".css$"))
+ (css (completing-read "theme: " css-choices nil t)))
+ (concat cssdir css)))
+
+ (defun set-org-html-style (&optional backend)
+ (interactive)
+ (when (or (null backend) (eq backend 'html))
+ (let ((f (or (and (boundp 'org-theme-css) org-theme-css) (org-theme))))
+ (if (file-exists-p f)
+ (progn
+ (set (make-local-variable 'org-theme-css) f)
+ (set (make-local-variable 'org-html-head)
+ (with-temp-buffer
+ (insert "<style type=\"text/css\">\n<!--/*--><![CDATA[/*><!--*/\n")
+ (insert-file-contents f)
+ (goto-char (point-max))
+ (insert "\n/*]]>*/-->\n</style>\n")
+ (buffer-string)))
+ (set (make-local-variable 'org-html-head-include-default-style)
+ nil)
+ (message "Set custom style from %s" f))
+ (message "Custom header file %s doesnt exist")))))
+#+END_SRC
+
+** additional org settings
+[2016-11-03 Thu 09:36]
+Thanks to [[https://github.com/dakrone/eos/blob/master/eos-org.org][eos-org]].
+
+Special begin/end of line to skip tags and stars
+
+#+BEGIN_SRC emacs-lisp
+ (setq org-special-ctrl-a/e t)
+#+END_SRC
+
+Special keys for killing a headline
+
+#+BEGIN_SRC emacs-lisp
+ (setq org-special-ctrl-k t)
+#+END_SRC
+
+blank lines are removed when exiting the code edit buffer
+
+#+BEGIN_SRC emacs-lisp
+ (setq org-src-strip-leading-and-trailing-blank-lines t)
+#+END_SRC
+
* CFEngine
#+BEGIN_SRC emacs-lisp
(require 'key-chord)
(key-chord-mode 1)
- (setq key-chord-two-keys-delay 0.16)
+ (setq key-chord-two-keys-delay 0.26)
(key-chord-define cfengine3-mode-map ";;" "\C-e;")
(key-chord-define cfengine3-mode-map ",," "\C-e,")
(key-chord-define prog-mode-map ";;" "\C-e;")
(defalias 'tp 'transpose-paragraphs)
#+END_SRC
+Save whatever’s in the current (system) clipboard before
+replacing it with the Emacs’ text.
+https://github.com/dakrone/eos/blob/master/eos.org
+
+#+BEGIN_SRC emacs-lisp
+ (setq save-interprogram-paste-before-kill t)
+#+END_SRC
* set theme bba1
[[https://emacsfodder.github.io/emacs-theme-editor/][Emacs Theme Editor]] is a nice tool to define your colors.
--- /dev/null
+
+html {
+ height: 100%;
+}
+
+body {
+ background-color: #bbbbbb;
+ color: #000000;
+ margin: 0px;
+ padding: 0px;
+ height: 100%;
+}
+
+#header {
+ background-color: #e3e6ea;
+ border-bottom: 1px solid #f08900;
+}
+
+#footer {
+ background-color: #e3e6ea;
+ text-align: center;
+ border-top: 1px solid #f08900;
+ position: absolute;
+ bottom: 0;
+ left: 0px;
+ width: 100%;
+ padding: 4px;
+}
+
+#content {
+ padding: 10px;
+}
+
+h1.title {
+ padding: 4px;
+ margin: 0px;
+}
+
+.message {
+ color: #66AA66;
+}
+
+.error {
+ color: #CC4444;
+}
+
+.cat {
+/* display: inline; */
+ display: block;
+/* width: 300px; */
+ float: left;
+ margin: 4px;
+/* border: 1px solid black; */
+ }
+
+.cat h3 {
+ background: #c6c9cc;
+}
+
+.maincat {
+/* border: 1px solid green; */
+ display: block;
+ }
+
+.textentry {
+ background: #29759c;
+ color: #84cbef;
+ box-shadow: 5px 5px 5px #888;
+ }
+
+.org-src-container {
+ background: #29759c;
+ color: #84cbef;
+ box-shadow: 5px 5px 5px #888;
+ }
+
+pre.src:before {
+ display: none;
+ position: absolute;
+ background-color: white;
+ top: -10px;
+ right: 10px;
+ padding: 3px;
+ border: 1px solid black;
+}
+
+pre.src:hover:before { display: inline;}
+pre.src-sh:before { content: 'sh'; }
+pre.src-bash:before { content: 'sh'; }
+pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
+pre.src-R:before { content: 'R'; }
+pre.src-perl:before { content: 'Perl'; }
+pre.src-java:before { content: 'Java'; }
+pre.src-sql:before { content: 'SQL'; }
+
+
+#table-of-contents {
+ font-size: 9pt;
+ position: fixed;
+ right: 0em;
+ top: 0em;
+ background: #AAAAAA;
+ -webkit-box-shadow: 0 0 1em #777777;
+ -moz-box-shadow: 0 0 1em #777777;
+ -webkit-border-bottom-left-radius: 5px;
+ -moz-border-radius-bottomleft: 5px;
+ text-align: right;
+ /* ensure doesn't flow off the screen when expanded */
+ max-height: 80%;
+ overflow: auto;
+ z-index: 200;
+}
+
+table{
+ border-collapse:collapse;
+ border-spacing:0;
+ empty-cells:show;
+ margin-bottom:24px;
+ border-bottom:1px solid #e1e4e5;
+}
+
+td{
+ vertical-align:top}
+
+table td,table th{
+ font-size:90%;
+ margin:0;
+ overflow:visible;
+ padding:8px 16px;
+ background-color:white;
+ border:1px solid #e1e4e5;
+}
+
+table thead th{
+ font-weight:bold;
+ border-top:3px solid #e1e4e5;
+ border-bottom:1px solid #e1e4e5;
+}
+
+table caption{
+ color:#000;
+ font:italic 85%/1 arial,sans-serif;
+ padding:1em 0;
+}
+
+table tr:nth-child(2n-1) td{
+ background-color:#f3f6f6;
+}
+
+table tr:nth-child(2n) td{
+ background-color:white;
+}
+
+.codeblock,pre.src,#content .literal-block{
+ border:1px solid #e1e4e5;
+ padding:12px;
+ overflow-x:auto;
+ margin:1px 0 24px 0}
+
+pre.src{
+ display:block;
+ font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;
+ font-size:12px;
+ line-height:1.5;
+ margin:1px 0px 24px 0px;
+ overflow:auto;
+ padding:12px;
+ white-space:pre;
+}
--- /dev/null
+@import url(http://fonts.googleapis.com/css?family=Open+Sans);
+
+body {
+ padding: 0;
+ background: #eee none repeat scroll 0 0;
+ max-width: 1000px;
+ margin: 0px auto;
+ padding: 1em;
+ color: #000;
+ font-family: "Open Sans", "Bitstream Vera Sans", "Verdana", sans-serif;
+ line-height: 1.4em;
+ font-size: 90%;
+}
+
+code {
+ color: #00f;
+ padding: 1px 1px 1px 1px;
+ border: 1px solid #ddd;
+ background: #eee;
+ font-size: 115%;
+ border-radius: 2px;
+ line-height: 1em;
+ font-family: monospace;
+}
+
+pre {
+ border: 1pt solid #AEBDCC;
+ background: #eee;
+ padding: 5pt;
+ overflow: auto;
+ border-radius: 4px;
+ box-shadow: 3px 3px 3px #eee;
+ line-height: 1em;
+ font-family: monospace;
+ font-size: 115%;
+}
+
+div#content {
+ border: 1px solid #bbb;
+ background: #fff;
+ margin: 0;
+ padding: 3em;
+}
+
+blockquote {
+ padding: 0px 10px 0px 10px;
+ border: 1px solid #ddd;
+ background: #eee;
+ box-shadow: 5px 5px 5px #eee;
+ border-radius: 2px;
+ line-height: 1.2em;
+}
+
+a {
+ color: #139;
+ text-decoration: underline;
+ padding: 1px;
+}
+
+a:hover {
+ color: #900;
+}
+
+/*
+a:visited {
+ color: #939;
+}
+*/
+
+#table-of-contents {
+ margin: 1em 0;
+ padding: .1em;
+ text-decoration: none;
+}
+
+div#content div#org-div-home-and-up {
+ background: #369;
+ color: #fff;
+}
+
+div#org-div-home-and-up a:link,
+div#org-div-home-and-up a:visited {
+ color: #fff;
+ background: #369;
+}
+
+div#org-div-home-and-up a:hover {
+ color: #900;
+}
+
+div.title {
+ margin: -1em -1em 0;
+ font-size: 200%;
+ font-weight: bold;
+ background: #369;
+ color: #fff;
+ padding: .75em 1em;
+ letter-spacing: .1em;
+}
+
+h1 {
+ background: #369 none repeat scroll 0 0;
+ font-family: "Cardo", "Palatino Linotype", "Book Antiqua", Palatino, serif;
+ color: #fff;
+ font-size: 230%;
+ font-weight: bold;
+ letter-spacing: 0.1em;
+ margin: -1em -1em .2em;
+ padding: 0.75em 1em;
+}
+
+h2 {
+ font-size: 200%;
+ font-family: "Cardo", "Palatino Linotype", "Book Antiqua", Palatino, serif;
+ border-bottom: 1px solid #ccc;
+ padding: .2em;
+}
+
+h3 {
+ font-size: 170%;
+ font-family: "Cardo", "Palatino Linotype", "Book Antiqua", Palatino, serif;
+ border-bottom: 1px solid #eee;
+ padding: .2em;
+}
+
+h4 {
+ font-size: 140%;
+ font-family: "Cardo", "Palatino Linotype", "Book Antiqua", Palatino, serif;
+ border-bottom: 1px solid #eee;
+ padding: .2em;
+}
+
+/* h1, h2, h3, h4, h5, h6 {
+ text-transform: capitalize;
+}
+*/
+
+tt {
+ color: #00f;
+}
+
+.verbatim {
+ margin: .5em 0;
+}
+
+.verbatim pre {
+ margin: 0;
+}
+.verbatim-caption {
+ border: 1px solid #ccc;
+ border-bottom: 0;
+ background: #fff;
+ display: block;
+ font-size: 80%;
+ padding: .2em;
+}
+
+div#postamble {
+ text-align: left;
+ color: #888;
+ font-size: 80%;
+ padding: 0;
+ margin: 0;
+}
+
+div#postamble p {
+ padding: 0;
+ margin: 0;
+}
+
+div#postamble a {
+ color: #888;
+}
+
+div#postamble a:hover {
+ color: #900;
+}
+
+table {
+ font-size: 100%;
+ border-collapse: collapse;
+ margin: .5em 0;
+}
+
+th, td {
+ border: 1px solid #777;
+ padding: .3em;
+ margin: 2px;
+}
+th {
+ background: #eee;
+}
+
+span.underline {
+ text-decoration: underline;
+}
+
+.fixme {
+ background: #ff0;
+ font-weight: bold;
+}
+.ra {
+ text-align: right;
+}
+
+.sidebar {
+ float: right;
+ width: 25em;
+ background-color: #a02f6c;
+ color: #fff;
+ margin: 2em -2em 2em 2em;
+ padding: 1em;
+}
+.sidebar a {
+ border: none;
+}
+
+.sidebar a:link {
+ color: #3ff;
+}
+.sidebar a:visited {
+ color: #3cc;
+}
+.sidebar a:hover {
+ color: #ff6;
+}
+.sidebar a:active {
+ color: #900;
+}
+
+/* Todo List Styles */
+
+.title { text-align: center; }
+.todo {
+ font-family: monospace;
+ color: red;
+}
+.done { color: green; }
+.timestamp { color: gray }
+.timestamp-kwd { color: #f59ea0; }
+.tag {
+ background-color:#add8e6;
+ font-weight:normal;
+ font-size: 50%;
+}
+.target { background-color: #551a8b; }
+table { border-collapse: collapse; }
+td, th {
+ vertical-align: top;
+}
+
+/* Source code formatting */
+
+.org-info-search-highlight
+{
+ background-color:#adefef; /* same color as emacs default */
+ color:#000000;
+ font-weight:bold;
+}
+
+.org-bbdb-company {
+ /* bbdb-company */
+ font-style: italic;
+}
+.org-bbdb-field-name {
+}
+.org-bbdb-field-value {
+}
+.org-bbdb-name {
+ /* bbdb-name */
+ text-decoration: underline;
+}
+.org-bold {
+ /* bold */
+ font-weight: bold;
+}
+.org-bold-italic {
+ /* bold-italic */
+ font-weight: bold;
+ font-style: italic;
+}
+.org-border {
+ /* border */
+ background-color: #000000;
+}
+.org-buffer-menu-buffer {
+ /* buffer-menu-buffer */
+ font-weight: bold;
+}
+.org-builtin {
+ /* font-lock-builtin-face */
+ color: #da70d6;
+}
+.org-button {
+ /* button */
+ text-decoration: underline;
+}
+.org-c-nonbreakable-space {
+ /* c-nonbreakable-space-face */
+ background-color: #ff0000;
+ font-weight: bold;
+}
+.org-calendar-today {
+ /* calendar-today */
+ text-decoration: underline;
+}
+.org-comment {
+ /* font-lock-comment-face */
+ color: #b22222;
+}
+.org-comment-delimiter {
+ /* font-lock-comment-delimiter-face */
+ color: #b22222;
+}
+.org-constant {
+ /* font-lock-constant-face */
+ color: #5f9ea0;
+}
+.org-cursor {
+ /* cursor */
+ background-color: #000000;
+}
+.org-default {
+ /* default */
+ color: #000000;
+ background-color: #ffffff;
+}
+.org-diary {
+ /* diary */
+ color: #ff0000;
+}
+.org-doc {
+ /* font-lock-doc-face */
+ color: #bc8f8f;
+}
+.org-escape-glyph {
+ /* escape-glyph */
+ color: #a52a2a;
+}
+.org-file-name-shadow {
+ /* file-name-shadow */
+ color: #7f7f7f;
+}
+.org-fixed-pitch {
+}
+.org-fringe {
+ /* fringe */
+ background-color: #f2f2f2;
+}
+.org-function-name {
+ /* font-lock-function-name-face */
+ color: #0000ff;
+}
+.org-header-line {
+ /* header-line */
+ color: #333333;
+ background-color: #e5e5e5;
+}
+.org-help-argument-name {
+ /* help-argument-name */
+ font-style: italic;
+}
+.org-highlight {
+ /* highlight */
+ background-color: #b4eeb4;
+}
+.org-holiday {
+ /* holiday */
+ background-color: #ffc0cb;
+}
+.org-info-header-node {
+ /* info-header-node */
+ color: #a52a2a;
+ font-weight: bold;
+ font-style: italic;
+}
+.org-info-header-xref {
+ /* info-header-xref */
+ color: #0000ff;
+ text-decoration: underline;
+}
+.org-info-menu-header {
+ /* info-menu-header */
+ font-weight: bold;
+}
+.org-info-menu-star {
+ /* info-menu-star */
+ color: #ff0000;
+}
+.org-info-node {
+ /* info-node */
+ color: #a52a2a;
+ font-weight: bold;
+ font-style: italic;
+}
+.org-info-title-1 {
+ /* info-title-1 */
+ font-size: 172%;
+ font-weight: bold;
+}
+.org-info-title-2 {
+ /* info-title-2 */
+ font-size: 144%;
+ font-weight: bold;
+}
+.org-info-title-3 {
+ /* info-title-3 */
+ font-size: 120%;
+ font-weight: bold;
+}
+.org-info-title-4 {
+ /* info-title-4 */
+ font-weight: bold;
+}
+.org-info-xref {
+ /* info-xref */
+ color: #0000ff;
+ text-decoration: underline;
+}
+.org-isearch {
+ /* isearch */
+ color: #b0e2ff;
+ background-color: #cd00cd;
+}
+.org-italic {
+ /* italic */
+ font-style: italic;
+}
+.org-keyword {
+ /* font-lock-keyword-face */
+ color: #a020f0;
+}
+.org-lazy-highlight {
+ /* lazy-highlight */
+ background-color: #afeeee;
+}
+.org-link {
+ /* link */
+ color: #0000ff;
+ text-decoration: underline;
+}
+.org-link-visited {
+ /* link-visited */
+ color: #8b008b;
+ text-decoration: underline;
+}
+.org-match {
+ /* match */
+ background-color: #ffff00;
+}
+.org-menu {
+}
+.org-message-cited-text {
+ /* message-cited-text */
+ color: #ff0000;
+}
+.org-message-header-cc {
+ /* message-header-cc */
+ color: #191970;
+}
+.org-message-header-name {
+ /* message-header-name */
+ color: #6495ed;
+}
+.org-message-header-newsgroups {
+ /* message-header-newsgroups */
+ color: #00008b;
+ font-weight: bold;
+ font-style: italic;
+}
+.org-message-header-other {
+ /* message-header-other */
+ color: #4682b4;
+}
+.org-message-header-subject {
+ /* message-header-subject */
+ color: #000080;
+ font-weight: bold;
+}
+.org-message-header-to {
+ /* message-header-to */
+ color: #191970;
+ font-weight: bold;
+}
+.org-message-header-xheader {
+ /* message-header-xheader */
+ color: #0000ff;
+}
+.org-message-mml {
+ /* message-mml */
+ color: #228b22;
+}
+.org-message-separator {
+ /* message-separator */
+ color: #a52a2a;
+}
+.org-minibuffer-prompt {
+ /* minibuffer-prompt */
+ color: #0000cd;
+}
+.org-mm-uu-extract {
+ /* mm-uu-extract */
+ color: #006400;
+ background-color: #ffffe0;
+}
+.org-mode-line {
+ /* mode-line */
+ color: #000000;
+ background-color: #bfbfbf;
+}
+.org-mode-line-buffer-id {
+ /* mode-line-buffer-id */
+ font-weight: bold;
+}
+.org-mode-line-highlight {
+}
+.org-mode-line-inactive {
+ /* mode-line-inactive */
+ color: #333333;
+ background-color: #e5e5e5;
+}
+.org-mouse {
+ /* mouse */
+ background-color: #000000;
+}
+.org-negation-char {
+}
+.org-next-error {
+ /* next-error */
+ background-color: #eedc82;
+}
+.org-nobreak-space {
+ /* nobreak-space */
+ color: #a52a2a;
+ text-decoration: underline;
+}
+.org-org-agenda-date {
+ /* org-agenda-date */
+ color: #0000ff;
+}
+.org-org-agenda-date-weekend {
+ /* org-agenda-date-weekend */
+ color: #0000ff;
+ font-weight: bold;
+}
+.org-org-agenda-restriction-lock {
+ /* org-agenda-restriction-lock */
+ background-color: #ffff00;
+}
+.org-org-agenda-structure {
+ /* org-agenda-structure */
+ color: #0000ff;
+}
+.org-org-archived {
+ /* org-archived */
+ color: #7f7f7f;
+}
+.org-org-code {
+ /* org-code */
+ color: #7f7f7f;
+}
+.org-org-column {
+ /* org-column */
+ background-color: #e5e5e5;
+}
+.org-org-column-title {
+ /* org-column-title */
+ background-color: #e5e5e5;
+ font-weight: bold;
+ text-decoration: underline;
+}
+.org-org-date {
+ /* org-date */
+ color: #a020f0;
+ text-decoration: underline;
+}
+.org-org-done {
+ /* org-done */
+ color: #228b22;
+ font-weight: bold;
+}
+.org-org-drawer {
+ /* org-drawer */
+ color: #0000ff;
+}
+.org-org-ellipsis {
+ /* org-ellipsis */
+ color: #b8860b;
+ text-decoration: underline;
+}
+.org-org-formula {
+ /* org-formula */
+ color: #b22222;
+}
+.org-org-headline-done {
+ /* org-headline-done */
+ color: #bc8f8f;
+}
+.org-org-hide {
+ /* org-hide */
+ color: #e5e5e5;
+}
+.org-org-latex-and-export-specials {
+ /* org-latex-and-export-specials */
+ color: #8b4513;
+}
+.org-org-level-1 {
+ /* org-level-1 */
+ color: #0000ff;
+}
+.org-org-level-2 {
+ /* org-level-2 */
+ color: #b8860b;
+}
+.org-org-level-3 {
+ /* org-level-3 */
+ color: #a020f0;
+}
+.org-org-level-4 {
+ /* org-level-4 */
+ color: #b22222;
+}
+.org-org-level-5 {
+ /* org-level-5 */
+ color: #228b22;
+}
+.org-org-level-6 {
+ /* org-level-6 */
+ color: #5f9ea0;
+}
+.org-org-level-7 {
+ /* org-level-7 */
+ color: #da70d6;
+}
+.org-org-level-8 {
+ /* org-level-8 */
+ color: #bc8f8f;
+}
+.org-org-link {
+ /* org-link */
+ color: #a020f0;
+ text-decoration: underline;
+}
+.org-org-property-value {
+}
+.org-org-scheduled-previously {
+ /* org-scheduled-previously */
+ color: #b22222;
+}
+.org-org-scheduled-today {
+ /* org-scheduled-today */
+ color: #006400;
+}
+.org-org-sexp-date {
+ /* org-sexp-date */
+ color: #a020f0;
+}
+.org-org-special-keyword {
+ /* org-special-keyword */
+ color: #bc8f8f;
+}
+.org-org-table {
+ /* org-table */
+ color: #0000ff;
+}
+.org-org-tag {
+ /* org-tag */
+ font-weight: bold;
+}
+.org-org-target {
+ /* org-target */
+ text-decoration: underline;
+}
+.org-org-time-grid {
+ /* org-time-grid */
+ color: #b8860b;
+}
+.org-org-todo {
+ /* org-todo */
+ color: #ff0000;
+}
+.org-org-upcoming-deadline {
+ /* org-upcoming-deadline */
+ color: #b22222;
+}
+.org-org-verbatim {
+ /* org-verbatim */
+ color: #7f7f7f;
+ text-decoration: underline;
+}
+.org-org-warning {
+ /* org-warning */
+ color: #ff0000;
+ font-weight: bold;
+}
+.org-outline-1 {
+ /* outline-1 */
+ color: #0000ff;
+}
+.org-outline-2 {
+ /* outline-2 */
+ color: #b8860b;
+}
+.org-outline-3 {
+ /* outline-3 */
+ color: #a020f0;
+}
+.org-outline-4 {
+ /* outline-4 */
+ color: #b22222;
+}
+.org-outline-5 {
+ /* outline-5 */
+ color: #228b22;
+}
+.org-outline-6 {
+ /* outline-6 */
+ color: #5f9ea0;
+}
+.org-outline-7 {
+ /* outline-7 */
+ color: #da70d6;
+}
+.org-outline-8 {
+ /* outline-8 */
+ color: #bc8f8f;
+}
+.org-preprocessor {
+ /* font-lock-preprocessor-face */
+ color: #da70d6;
+}
+.org-query-replace {
+ /* query-replace */
+ color: #b0e2ff;
+ background-color: #cd00cd;
+}
+.org-regexp-grouping-backslash {
+ /* font-lock-regexp-grouping-backslash */
+ font-weight: bold;
+}
+.org-regexp-grouping-construct {
+ /* font-lock-regexp-grouping-construct */
+ font-weight: bold;
+}
+.org-region {
+ /* region */
+ background-color: #eedc82;
+}
+.org-rmail-highlight {
+}
+.org-scroll-bar {
+ /* scroll-bar */
+ background-color: #bfbfbf;
+}
+.org-secondary-selection {
+ /* secondary-selection */
+ background-color: #ffff00;
+}
+.org-shadow {
+ /* shadow */
+ color: #7f7f7f;
+}
+.org-show-paren-match {
+ /* show-paren-match */
+ background-color: #40e0d0;
+}
+.org-show-paren-mismatch {
+ /* show-paren-mismatch */
+ color: #ffffff;
+ background-color: #a020f0;
+}
+.org-string {
+ /* font-lock-string-face */
+ color: #bc8f8f;
+}
+.org-texinfo-heading {
+ /* texinfo-heading */
+ color: #0000ff;
+}
+.org-tool-bar {
+ /* tool-bar */
+ color: #000000;
+ background-color: #bfbfbf;
+}
+.org-tooltip {
+ /* tooltip */
+ color: #000000;
+ background-color: #ffffe0;
+}
+.org-trailing-whitespace {
+ /* trailing-whitespace */
+ background-color: #ff0000;
+}
+.org-type {
+ /* font-lock-type-face */
+ color: #228b22;
+}
+.org-underline {
+ /* underline */
+ text-decoration: underline;
+}
+.org-variable-name {
+ /* font-lock-variable-name-face */
+ color: #b8860b;
+}
+.org-variable-pitch {
+}
+.org-vertical-border {
+}
+.org-warning {
+ /* font-lock-warning-face */
+ color: #ff0000;
+ font-weight: bold;
+}
--- /dev/null
+/** RESETS **/
+
+html,body,div,span,dl,dt,dd,ul,ol,li,a,table,h1,h2,h3,h4,h5,h6,p,pre,form,fieldset,blockquote,.src,.example{margin:0px;padding:0px;font-weight:normal;text-decoration:none;font-size:inherit;color:inherit;}
+
+.section-number-1,.section-number-2,.section-number-3,.section-number-4,.section-number-5,.section-number-6{font-weight:inherit;}
+
+.float-right{float:right;}
+
+.author{
+color:#666;
+line-height:3em;
+}
+
+body{
+ font:87.5% "Georgia Serif", Times, Palatino, "Times New Roman", serif;
+ background: #DCDCDC;
+}
+a{color:blue;}
+html>body{font-size:14px;}
+
+body{
+ width:54em;
+ padding:1.5em;
+ padding-top:6em;
+ margin: auto;
+
+}
+
+p{
+ line-height:1.5em;
+ font-size:1em;
+ margin-top:1.5em;
+ margin-bottom:1.5em;
+}
+.post_list{
+ margin-top:1.5em;
+}
+
+.title{text-align:left;}
+
+
+
+h1{font-size:2.5em;line-height:1.2em;}
+h2{font-size:1.5em;line-height:1em;margin-top:2em;margin-bottom:1em;}
+h3{
+ font-size:1.1667em;
+ line-height: 1.286em;
+ margin-top:1.929em;
+ margin-bottom:0.643em;
+ font-weight:bolder;
+}
+h4{
+ font-weight:bold;
+ line-height:3em;
+}
+
+
+
+
+/*p + dl{
+ margin-top:-1.5em;
+ border:1px solid red;
+}*/
+dt{font-weight:bold;}
+dd{padding-left:1.5em;}
+
+li{
+ font-size:100%;
+ line-height:1.5em;
+}
+
+
+div{margin:0!important;padding:0!important;}
+/*table{display:none;}*/
+.src,.example{margin:0;padding:1em;font-size:1em;line-height:1.5em;
+}
+.src{background:#444;color:#fff;}
+.example{background:#242834;color:#fff;padding:.75em}
+
+
+
+.header{
+ font-family:Arial,Helvetica,Verdana,sans-serif;
+ vertical-align:text-top;
+ position:absolute;
+ top:0px;left:0px;
+ right:0px;
+ background:#345;
+ padding:.75em 1.5em!important;
+ border-bottom:1.5em solid #EBD6D6;
+ border-bottom-color:#9FB8D3;
+ background:#0F4D92;
+
+ border-bottom:1em solid #cdf;
+ background:#444;
+ background:#49A;
+ background:transparent;
+ background:#eef0ff;
+
+ background:#933;
+ background:#A55;
+
+ border-color:#EDD;
+
+ /*background: #939;
+ border-color:#EDE;*/
+
+ /* background:#359; */
+ /* border-color:#9AC; */
+
+}
+
+
+
+
+
+.header h1{
+font:1.75em Arial,Helvetica,Verdana,sans-serif;
+line-height:1.166em;
+font-weight:bold;
+color:#b90;
+color:#06a;
+color:#fff;
+
+text-shadow: #822 0px 0px 2px;
+
+font-weight:normal;
+display:inline;
+}
+.header h1 em{
+ color:#b90;
+ color:#fc2;
+ color:#b90;
+ color:#db2;
+ color:#fd4;
+ font-weight:bold;
+ font-style:normal;
+}
+.header * {vertical-align:middle;}
+
+.header ul {
+ display:inline;
+ padding-left:1.5em;
+ margin-left:0!important;
+}
+.header li {
+ display:inline;
+ padding:0 .75em;
+}
+.header li a{
+ text-decoration:none;
+ color:#ffd;
+}
+
+
+/*dl{display:none;}*/
+
+
+
+ol{margin-left:1.5em;}
+ul{
+ list-style-type: disc;
+ margin-left:1.5em;
+}
+ul ul{
+ list-style-type:circle;
+}
+
+#table-of-contents ul{list-style-type:none;}
+#text-table-of-contents > ul:first-child > li > a{ font-weight:bold;}
+
+
+
+
+#postamble p,#postamble a{
+ font-size:.857em;
+ line-height:1.75em;
+ padding:0;
+ margin:0;
+}
+#postamble{
+ margin:1.75em 0!important;
+ border-top:1px solid #888;
+}
+
+blockquote{
+ margin-left:1em;
+}
+
+
+
+
+
+
+
+
+
+
+
+/*** blue **/
+a{}
+.header a{background:inherit;}
+h1,h2,h3,h4,h5,h6, #text-table-of-contents li{
+ color:#026;
+ color:#0A3361;
+ font-weight:normal;
+}
+.header{background:#0F4D92;border-bottom-color:#AFC4DB
+}
+
+/*.header h1{text-shadow: #228 0px 0px 2px;}*/
+
+
+
+
+
+
+
+
+h1,h2,h3,h4,h5,h6{
+ color:#373737;
+ font-weight:bolder;
+}
+
+h1.title{font-weight:normal;font-size:3em;line-height:1em;}
+
+body{width:48em;}
+img{max-width:48em;}
+
+body{text-align:justify;
+ font:12px "Lucida Grande","Trebuchet MS","Bitstream Vera Sans",Verdana,Helvetica,sans-serif !important;
+ color:#272727;
+}
+code{
+ font-weight:inherit;
+ color:#048;
+ color:black;
+
+}
+
+a{color:#00e}
+a:visited{color:#551A8B}
+
+
+.figure {
+ background:#ddd;
+ border:1px solid #ccc;
+ font-size:.90em;
+ line-height:1.666em;
+ padding:1.5em!important;
+ text-align:left!important;
+ margin-bottom:1.666em;
+}
+
+.outline-2{
+ margin:3em 0!important;
+}
+
+
+body{padding-top:9em;padding-left:3em;}
+.header{
+ padding-left:3!important;
+}
+.header h1, .header h1 em {
+ text-shadow:none;
+ font-size:1.5em!important;
+}
+
+.header {
+ background:transparent;
+ padding-left:3em!important;
+ border-bottom:none;
+ color:inherit!important;
+ background:#dde8ff;
+ border-bottom:1px solid #c3d9ff;
+}
+.header h1, .header h1 em {
+ text-shadow:none;
+ color:#06c;
+
+ font-family:"Georgia Serif", Times, Palatino, "Times New Roman", serif;
+}
+.header li a {
+ color:inherit!important;
+ text-decoration:underline;
+}
+
+#text-table-of-contents a {
+
+}
--- /dev/null
+
+* {
+ font-family: "Georgia";
+}
+
+h1, h2, h3, h4, h5, h6,
+h1 span, h2 span, h3 span, h4 span, h5 span, h6 span,
+h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
+ font-family: "Arial";
+}
+
+pre, code {
+ font-family: Monaco, "Courier New", Courier;
+}
+
+#text-table-of-contents a {
+ font-family: "Arial";
+}
+
+/* @end */
+
+/* @group Baseline */
+body {
+ font-size: 14px;
+ line-height: 1.5em;
+ padding: 0;
+ margin: 0;
+}
+h1 {
+ margin: 0;
+ font-size: 1.6666666666666667em;
+ line-height: 0.9em;
+ margin-bottom: 0.9em;
+}
+h2 {
+ margin: 0;
+ font-size: 1.5em;
+ line-height: 1em;
+ margin-bottom: 1em;
+}
+h3 {
+ margin: 0;
+ font-size: 1.3333333333333333em;
+ line-height: 1.125em;
+ margin-bottom: 1.125em;
+}
+h4 {
+ margin: 0;
+ font-size: 1.1666666666666667em;
+ line-height: 1.2857142857142858em;
+ margin-bottom: 1.2857142857142858em;
+}
+p, ul, blockquote, pre, td, th, label {
+ margin: 0;
+ font-size: 1em;
+ line-height: 1.5em;
+ margin-bottom: 1.5em;
+}
+p.small, #postamble {
+ margin: 0;
+ font-size: 0.8333333333333334em;
+ line-height: 1.8em;
+ margin-bottom: 1.8em;
+}
+table {
+ border-collapse: collapse;
+ margin-bottom: 1.5em;
+}
+/* @end */
+
+/* @group Layout */
+
+#content {
+ width: 70em;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+/* #header {
+ height: 10em;
+}
+*/
+
+#table-of-contents {
+ width: 15em;
+ float: left;
+ overflow: auto;
+}
+
+/* #main { */
+div.outline-2 {
+ width: 52em;
+ float: right;
+ /* The lines below are useful if the "main" div isn't available and
+ div.outline-2 has to be used. */
+ position: relative;
+}
+
+#postamble {
+ clear: both;
+ text-align: center;
+}
+
+div.outline-2 pre {
+ width: 40em;
+ overflow: auto;
+}
+
+/* @end */
+
+/* @group Header */
+
+h1.title {
+ margin-top: 10px;
+ text-align: center;
+}
+
+h1.title {
+ font-size: 3em;
+ font-weight: bold;
+
+ margin-bottom: 0.8em;
+}
+
+/* @end */
+
+/* @group Org Keywords */
+
+.todo {
+ color: red;
+}
+
+.done {
+ color: green;
+}
+
+.tag {
+ color: blue;
+ text-transform: lowercase;
+ /* This will be obscured by the surrounding span tag, so blank everything. */
+ background: #fff;
+ border: none;
+ /* position: relative;
+ text-align: right;
+ right: 1em; */
+}
+
+.timestamp {
+}
+
+.timestamp-kwd {
+ /* keyword associated with a time stamp, like SCHEDULED */
+}
+
+.target {
+ /* target for links */
+}
+
+/* @end */
+
+/* @group Table of Contents */
+
+#table-of-contents h2 {
+ letter-spacing: -0.1em;
+}
+
+#table-of-contents ul,
+#table-of-contents ol {
+ padding-left: 1em;
+}
+
+/* @end */
+
+/* @group Outline Level 2 */
+
+.outline-2 h2 {
+ background: #ffc;
+ border-bottom: 1px solid #ccc;
+}
+
+.outline-2 h2, .outline-2 h3 {
+ letter-spacing: -0.05em;
+}
+
+.outline-2 {
+ padding: 5px;
+ /* margin-bottom: 10px; */
+ /* border-top: 1px solid #ccc; */
+}
+
+/* @end */
+
+td {
+ border: 1px solid #ccc;
+}
+
+
+h1 span, h2 span, h3 span, h4 span, h5 span, h6 span {
+ background-color: #eee;
+ padding: 2px;
+ border: 1px solid #ccc;
+}
+
+.outline-1, .outline-2, .outline-3, .outline-4, .outline-5, .outline-6 {
+ margin-left: 2em;
+}
+
+a {
+ text-decoration: none;
+ color: #57d; /* TODO: Find a better colour for this. */
+}
+
+a:hover {
+ border-bottom: 1px dotted #57d;
+}
+
+#postamble p {
+ margin: 0px;
+}
+
+.footpara { display: inline; }
+
+.footdef { margin-bottom: 3em; font-size: 80%; }
+
--- /dev/null
+h1.title {
+ text-align: center;
+}
+
+h4 {margin-bottom: 0; padding-bottom: 0;}
+.outline-text-4 > :first-child { margin-top:.5em }
+
+/* old top menu */
+/*
+#table-of-contents {
+ border-color: #A3A3A3;
+ border-image: none;
+ border-style: solid;
+ border-width: 1px 0;
+}
+*/
+
+/* fixed menu */
+#table-of-contents {
+position: fixed;
+ left:2px;top:0;
+ width:300px;
+}
+
+#table-of-contents ul {
+ padding: 0;
+ margin: 0;
+ padding-left: 10px;
+}
+
+pre {
+ margin-left: 3em;
+ border-left: 2px solid #767676;
+ background: #F1F1F1;
+ padding: 1em 0em 1em 1em;
+ font-size: 1.2em;
+}
+#postamble a {
+ color: #525E9A;
+}
+#postamble {
+ text-align: center;
+ font-size: 0.7em;
+ border-top: 1px solid #ABA6A6;
+ margin-top: 4em;
+ color: #808080;
+}
+#postamble p { width: 100%; }
+body {
+ font-family: verdana;
+ font-size: 0.8em;
+ min-width: 800px;
+ max-width: 1000px;
+ margin-left: 300px;
+ // margin:auto;
+}
+code {
+ background: #EDEDED;
+ font-size: 1.2em;
+}
+
+p, li {
+ max-width: 59em;
+}
+
+span.todo, span.done {
+ font-size: 50%;
+ text-decoration: none;
+ border-radius: 5px;
+ padding: 3px;
+ color: white;
+}
+span.todo { background: #dd0000; }
+span.done { background: #00dd00; }
+blockquote { background: #dddddd; padding: .5em 1em .5em 1em;}
+pre, pre * { color: black !important; }
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-get-securitygroup-references (yank)
+# key: aws-ec2-get-securitygroup-references
+# --
+aws --profile=${1:$$(yas-choose-value '("prod" "test"))} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" bba-aws-regions)}} ec2 describe-security-group-references --group-id ${4:`(yank)`} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-get-snapshot-details (yank)
+# key: snap-details
+# --
+aws --profile=${1:$$(yas-choose-value '("prod" "test"))} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" bba-aws-regions)}} ec2 describe-snapshots --snapshot-id ${4:`(yank)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
# -*- mode: snippet -*-
-# name: aws-ec2-volume-details
+# name: aws-ec2-volume-details (yank)
# key: ebs-details
# --
aws --profile=${1:$$(yas-choose-value '("prod" "test"))} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" bba-aws-regions)}} ec2 describe-volumes --volume-ids ${4:`(yank)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-rds-describe-db-instance-details (yank)
+# key: aws-rds-describe-db-instance-details
+# --
+aws --profile=${1:$$(yas-choose-value '("prod" "test"))} ${2:--region=${3:$$(yas-choose-value bba-aws-regions)}} rds describe-db-instances --db-instance-identifier ${4:`(yank)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
# -*- mode: snippet -*-
# name: aws-rds-describe-db-instances
-# key: aws-rds-describe-db-instances
+# key: rds-ls
# --
aws --profile=${1:$$(yas-choose-value '("prod" "test"))} ${2:--region=${3:$$(yas-choose-value bba-aws-regions)}} rds describe-db-instances --query "DBInstances[*].[DBInstanceIdentifier,DbiResourceId, Endpoint.Address]" --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
:engine: vertica
:dbhost: ${1:localhost}
:dbuser: ${2:user}
-:dbpassword: (concat ${3:bba-db})
+:dbpassword: (if (boundp '${3:bba-db})(concat $3))
:database: ${4:$2}
:exports: both
:dbprologue: "\\a"
+:eval: never-export
:END:
(setq $3 "$5")$0
=head1 EXAMPLES
- `(upcase (file-name-nondirectory (file-name-sans-extension (buffer-file-name))))` -p password
+ `(downcase (file-name-nondirectory (file-name-sans-extension (buffer-file-name))))` -p password
=cut
while true; do
case "\$1" in
- -p | --password ) PASSWORD="$2"; shift 2 ;;
+ -p | --password ) PASSWORD="\$2"; shift 2 ;;
-h | --help ) pod2usage \$0; exit ;;
-m | --man ) perldoc \$0; exit ;;
-v | --verbose ) VERBOSE=1; shift ;;