Skip to content

Instantly share code, notes, and snippets.

View samsonradu's full-sized avatar
💭
We were promised flying cars, instead we got 140 characters.

Samson Radu samsonradu

💭
We were promised flying cars, instead we got 140 characters.
View GitHub Profile
@samsonradu
samsonradu / Ooxml footnotes.WORD.yaml
Created October 11, 2021 13:06 — forked from AbidRahman-MSFT/Ooxml footnotes.WORD.yaml
Replace selection with sample text and footnote using Ooxml.
name: Ooxml footnotes
description: Replace selection with sample text and footnote using Ooxml.
host: WORD
api_set: {}
script:
content: >
$("#run").click(() => tryCatch(run));
const prefix = `<?xml version="1.0" encoding="UTF-8"?><pkg:package xmlns:pkg="http://schemas.microsoft.com/office/2006/xmlPackage"><pkg:part pkg:name="/_rels/.rels" pkg:contentType="application/vnd.openxmlformats-package.relationships+xml" pkg:padding="512"><pkg:xmlData><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="word/document.xml" /></Relationships></pkg:xmlData></pkg:part><pkg:part pkg:name="/word/_rels/document.xml.rels" pkg:contentType="application/vnd.openxmlformats-package.relationships+xml" pkg:padding="256"><pkg:xmlData><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId4" Type="http://schemas.openxmlform
@samsonradu
samsonradu / index.js
Last active August 29, 2015 13:56 — forked from mteichtahl/index.js
this.$palettes.on('hidden.bs.collapse', function (e) {
var $this = $(this),
$target = $(e.target);
var $i = $("span[itemprop=expandCollapseIcons] i", $target.closest(".panel"));
if ($i.hasClass('icon-chevron-down')) {
$i.removeClass('icon-chevron-down').addClass('icon-chevron-up');
} else {
$i.removeClass('icon-chevron-up').addClass('icon-chevron-down');
}
@samsonradu
samsonradu / index.js
Last active August 29, 2015 13:56 — forked from mteichtahl/index.js
this.$palettes.on('hidden.bs.collapse', function (e) {
var $this = $(this),
targetPage = $target.attr('id').slice(0, -6),
$target = $(e.target);
var $i = $("span[itemprop=expandCollapseIcons] i", $("#" + targetPage + "-panel");
if ($i.hasClass('icon-chevron-down')) {
$i.removeClass('icon-chevron-down').addClass('icon-chevron-up');
} else {
$i.removeClass('icon-chevron-up').addClass('icon-chevron-down');
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Backbone.js example</title>
<link rel="stylesheet" type="text/css" href="css/sunny/jqueryui.min.css"/>
</head>
<body>
<!-- "slider" is a jquery slider -->
<div id="slider"></div>