Skip to content

Instantly share code, notes, and snippets.

View dmccreary's full-sized avatar

Dan McCreary dmccreary

View GitHub Profile
@dmccreary
dmccreary / tigergraph-schema-json-to-gsql.js
Created May 1, 2020 13:28
Node.js script that will convert a TigerGraph schema archive JSON file into GSQL.
#!/usr/local/bin/node
# written by Josh Meekhof
var fs = require("fs");
var content = fs.readFileSync("schema.json");
var schema = JSON.parse(content);
var vertextT = [];
var edgeT = [];
const joiner = (acc, val) => acc + (val + "\n");
@dmccreary
dmccreary / add-mkdocs.sh
Created May 25, 2020 19:06
Add mkdocs files to a github repository.
#!/bin/sh
# add mkdocs to git repository
if [ $# -eq 0 ]
then
echo "No arguments supplied. Exiting."
exit 1
fi
if [ -d $1 ]
then
@dmccreary
dmccreary / setup-huggingface-transformers.sh
Last active January 31, 2021 03:41
notes on setting up huggingface transformers on a mac
conda create -n transformers python=3
conda activate transformers
conda install -c huggingface transformers
@dmccreary
dmccreary / 0-self-publishing.md
Created February 7, 2021 14:37 — forked from caseywatts/0-self-publishing.md
Self-Publishing via Markdown
@dmccreary
dmccreary / pico-sdk-mak-install.md
Last active November 6, 2022 15:42
Pico Mac SDK

How to Install the Raspberry Pi Pico SDK on a Mac

I wanted to test FFT on the Raspberry Pi Pico so I could create a real-time spectrum analizer using an LED strip. I have used MicroPython and Thonny for everything up until now. But FFT is only implemented in C for performance reasons. So to get started I had to install the Raspberry Pi Pico SDK on my Mac running Montery.

The Raspbery Pi Pico SDK code is here:

https://github.com/raspberrypi/pico-sdk

I installed it but the examples did not run because brew didn't support the EABI GCC

@dmccreary
dmccreary / .zshrc
Last active April 8, 2025 19:23
Sample startup file for MacOS
# short UNIX shell prompt
PS1='%2~ %\$ '
# alias to open visual studio code using the workspace
alias ovs='open -a "Visual Studio Code" *.code-workspace
# all the steps to publish content
alias pc='clear;git pull;git add *; git commit -m "updating content"; git push; mkdocs gh-deploy;'
@dmccreary
dmccreary / .gitignore
Created November 21, 2024 18:14
Dan's Personal Git Ignore file for mkdocs sites
site
.DS_Store
~$*
@dmccreary
dmccreary / install-social-override.sh
Created March 30, 2025 19:01
A progam that will install the correct directories and code to allow your mkdocs-material site to override social cards with a local image.
#!/bin/bash
# List of repositories to update
REPOS=(
"https://github.com/username/repo1.git"
"https://github.com/username/repo2.git"
# Add more repositories as needed
)
# Path to the installation script
@dmccreary
dmccreary / list-large-images-pptx.sh
Created April 6, 2025 15:12
List Large Images in Microsoft PPTX file
#!/bin/sh
# get the parameter
echo "working on" "$1"
rm -r /tmp/big-images 2> /dev/null
mkdir /tmp/big-images
# copy the ppt file to /tmp
cp "$1" /tmp/big-images
# rename it to be .zip
mv "/tmp/big-images/$1" "/tmp/big-images/$1.zip"
# unzip it