Skip to content

Instantly share code, notes, and snippets.

View stanrb's full-sized avatar

Stanislav "Stan" Bogdanov stanrb

View GitHub Profile
@stanrb
stanrb / Convert-DOCX-to-MD-via-Pandoc.bat
Last active April 30, 2018 14:53
This Windows bat script converts all of the DOCX files in a directory to Git-flavored Markdown and extracts their images. It uses Pandoc. Wrap is properly preserved and it works with spaces in the filenames.
REM Windows Convert DOCX to MD by Stan Bogdanov - stanrb.com - @StanRB
REM This Windows bat script converts all of the DOCX files in a directory to Git-flavored Markdown and extracts their images. Wrap is properly preserved and it works with spaces in the filenames.
REM You can't change the name of the folder the images are extracted to (it will be called "media") because of the DOCX container itself.
REM Converting is done in the current directory and you should have the pandoc executable in there.
REM You can just double-click the bat file to execute it. The file ends with a command to keep the command window open in case you want to inspect output.
REM The script will create a new directory called "converted" and sub-directories in there for each file. This way, each subdirectory will properly contain the media folder with images and the markdown file itself. You can optionally change this by removing the second mkdir command and changing the extrat-media path.
@stanrb
stanrb / primo-googleTagManager.js
Last active December 16, 2020 21:05 — forked from mlkirkpatrick/primo-googleTagManager.js
Injecting GTM in Primo's customization package
(function(){
'use strict';
let app = angular.module('googleTagManager', ['angularLoad']);
const gtmId = 'GTM-AAAAAAA'
const gtmAuth = 'abcd1234'
const gtmEnvId = 'env-1'
function addGTM(doc) {

Keybase proof

I hereby claim:

  • I am stanrb on github.
  • I am stanrb (https://keybase.io/stanrb) on keybase.
  • I have a public key ASDHyOXd96sbfExwmzy5WK8N9j7lLc6NpJTvR5l_UfM14go

To claim this, I am signing this object: