Skip to content

Instantly share code, notes, and snippets.

View mbohun's full-sized avatar
🙃
How do you do?

Martin Bohun Hormann mbohun

🙃
How do you do?
  • Canberra, ACT, Australia
View GitHub Profile
@mbohun
mbohun / NOTES.md
Last active June 24, 2021 10:04
git mirror repo
@mbohun
mbohun / dummy.md
Last active March 11, 2020 07:56
dummy

This is/was just to see if the number of public gists returned from the GitHub REST API / GraphQL API changes.

@mbohun
mbohun / NOTES.md
Created December 4, 2019 23:27
JavaScript raw socket notes
/*
Additional:

Update: From the W3C Draft January 2016:
This will be possible via the navigator interface as shown below:

http://raw-sockets.sysapps.org/#interface-tcpsocket
https://www.w3.org/TR/tcp-udp-sockets/
*/
@mbohun
mbohun / NOTES.md
Last active April 2, 2024 14:08
Converting MS Office files to PDF

Converting MS Office files to PDF

(Description of the different solutions / alternatives)

1. Microsoft Windows based solutions

1.1 Microsoft Graph API (Office 365)

This is the current, official, Microsoft endorsed/supported solution ("cloud based")
(2017 - present)

  1. The user uploads their MS Office document (source.doc in our example snippet bellow) to their Microsoft OneDrive
  2. The user then uses the Microsoft Graph REST API to send a HTTP GET Request to the Convert content endpoint:
@mbohun
mbohun / word_doc_to_docx.py
Last active April 20, 2023 05:48 — forked from davecoutts/word_doc_to_docx.py
Convert Word 'doc' files to 'docx', 'pdf', other format using win32com to automate Microsoft Word
# Convert Microsoft Word 'doc' files to 'docx' format by opening and
# saving Word files using win32com to automate Microsoft Word.
#
# The script walks a directory structure and converts all '.doc' files found.
# Original 'doc' and new 'docx' files are saved in the same directory.
#
# This Word automation method has been found to work where OFC.exe and
# wordconv.exe do not.
#
# Tested using Windows 7, Word 2013, python 2.7.10, pywin32-219.win-amd64-py2.7
@mbohun
mbohun / NOTES.md
Last active February 14, 2022 16:31
openSUSE nvidia

FCUK nouveau

# add one of these kernel boot args to grub
modprobe.blacklist=nouveau
nouveau.blacklist=1

add the nvidia repo and install

@mbohun
mbohun / NOTES.md
Last active September 30, 2019 10:56
openSUSE "Google Inc. -> Google LLC"
linux-bswl:/home/mbohun # zypper up google-chrome-stable
Loading repository data...
Warning: Repository 'openSUSE-Leap-42.2-Update' appears to be outdated. Consider using a different mirror or server.
Warning: Repository 'openSUSE-Leap-42.2-Update-Non-Oss' appears to be outdated. Consider using a different mirror or server.
Reading installed packages...
There is an update candidate for 'google-chrome-stable', but it is from a different vendor. Use 'zypper install google-chrome-stable-77.0.3865.90-1.x86_64' to install this candidate.
Resolving package dependencies...

The following item is locked and will not be changed by any action:
@mbohun
mbohun / jekyll_NOTES.md
Created September 20, 2019 03:03
jekyllrb.com
mbohun@linux-7fb8:~/src> jekyll.ruby2.6 new SmartForms_notes
Running bundle install in /home/mbohun/src/SmartForms_notes...

  ...

  Bundler: Post-install message from i18n:
  Bundler: 
  Bundler: HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
 Bundler: But that may break your application.
@mbohun
mbohun / XML_XPath_NOTES.md
Last active September 25, 2019 07:59
XML; XPath; xmllint
re-indent, pretty print XML file
export XMLLINT_INDENT='    '
cat test.xml | xmllint --xmlout --nsclean --format - > test-pretty_print.xml
syntax-highlight XML
cat test.xml | pygmentize -l xml | less