Skip to content

Instantly share code, notes, and snippets.

@ctalau
ctalau / mermaid.md
Created March 29, 2023 11:36 — forked from martinwoodward/mermaid.md
GitHub HTML Rendering Pipeline
```mermaid
sequenceDiagram
    participant dotcom
    participant iframe
    participant viewscreen
    dotcom->>iframe: loads html w/ iframe url
    iframe->>viewscreen: request template
    viewscreen->>iframe: html & javascript
 iframe->>dotcom: iframe ready
@ctalau
ctalau / integrate.sh
Last active May 3, 2022 09:32
Integrate Content Fusion Task History
# Function to generate a random string.
gen_random() {
cat /dev/urandom | tr -dc '[:alpha:]' | fold -w ${1:-20} | head -n 1
}
# Unpack the task archive and add it as a remote in the current git repo
TASK_ARCHIVE=${1#file:/}
TEMP_FOLDER=/tmp/`gen_random`
unzip -q $TASK_ARCHIVE -d $TEMP_FOLDER
ORIG_TASK_FOLDER=$TEMP_FOLDER/`ls $TEMP_FOLDER`
@ctalau
ctalau / main.css
Last active July 8, 2020 11:19
3-column-layout
TASKCARD {
box-sizing: border-box;
position: relative;
padding-top: 17px;
}
TASK {
border: 1px solid black;
border-bottom: 0;
visibility: -oxy-collapse-text;
}
.oxy-doc-2 {
font-family: Times New Roman;
}
.oxy-doc-2 [data-reference='true'] > [data-role='BEFORE_1'] {
text-decoration: underline;
color: navy !important;
margin-top: 2px !important;
margin-right: 2px !important;
@ctalau
ctalau / file.css
Last active November 12, 2019 00:06
SVG link chemistry
@page {
@top-center {
content: attr('link.svg');
}
}
@ctalau
ctalau / repro.xml
Created September 2, 2019 05:34
Ctrl+LEFT
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="gardenia">
<title>Title</title>
<body>
<section id="section_uxd_mgb_y3b">
<title>Some section</title>
<p/>
<p/>
</section>
@ctalau
ctalau / two-columns.css
Created February 26, 2019 16:09
Two columns
table, table > * {
border: none !important;
background-color: transparent !important;
}
title {
display:none;
}
table {
counter-reset: left right;
}
@ctalau
ctalau / phone-book-page-margin.css
Last active February 6, 2019 22:32
Phone book page margin
@xpath: "string-join(for $i in 1 to (count(preceding::h2)) return '.\A')";
h2 {
string-set: chapter-title oxy_xpath(@xpath);
}
@page chapter {
@right-top {
font-size: 50px;
text-align: right;
padding: 0;
content: string(chapter-title)
@ctalau
ctalau / columns.css
Created February 4, 2019 10:00
Chemistry Columns
@page {
column-count: 2;
}
h1 {
column-span: all;
text-align:center;
}
p {
-oxy-column-break-inside:avoid;
}
@ctalau
ctalau / page-margins.css
Last active February 5, 2019 21:37
Page margins
h2 {
string-set: chapter-title content();
}
@page chapter {
@top-center {
content: oxy_xpath('//h1/text()') " / " string(chapter-title) " / " counter(page);
}
}
article {
page: chapter;