Skip to content

Instantly share code, notes, and snippets.

View sgoggins's full-sized avatar
🧨
Engines pumping and thumping in time The green light flashes, the flags go up

Sean P. Goggins sgoggins

🧨
Engines pumping and thumping in time The green light flashes, the flags go up
View GitHub Profile
#!/usr/bin/env bash
set -e
OS=$(uname -s)
echo "Detected OS: $OS"
if [[ "$OS" == "Linux" ]]; then
if command -v resolvectl &>/dev/null; then
echo "Flushing DNS cache with resolvectl..."
@sgoggins
sgoggins / README.md
Last active May 6, 2025 20:31
Symbolic Linker

Symbolic Linker Tool

./create_symlink.sh /Volumes/super_60/github ~/github

@sgoggins
sgoggins / docxtomarkdown.md
Last active October 1, 2024 18:05
Pandoc: Word to Markdown

Convert a Word Document to Markdown

 pandoc -s CS3050SP2024-A2.docx -t markdown -o CS3050a2.md 

Convert a Word Document to Latex

pandoc -s Draft_method_findings.docx -t latex -o draft.tex 
@sgoggins
sgoggins / gist:6387a4287bbe45201a3a1b1d2a6ce3c6
Created September 5, 2024 18:50
Pandoc Word to Markdown
https://gist.github.com/sgoggins/653c59e35f8087680f200527788f3e6a
@sgoggins
sgoggins / gist:653c59e35f8087680f200527788f3e6a
Created September 5, 2024 18:48
Word Document to Markdown using Pandoc
pandoc -s CS3050SP2024-A2.docx -t markdown -o CS3050a2.md

SQL to extract the GitHub organization from a repository URL

SELECT distinct 
    substring(repo_git from 'github.com/([^/]+)/') as org_name
FROM
    repo
#!/bin/bash
find . -name ".DS_Store" -delete
## You're welcome
## Please tweet #AugurOfChaossRules
@sgoggins
sgoggins / server-stop-example.sh
Created July 2, 2021 18:51
Augur server stop example for several instances.
#!/bin/bash
cd augur-spos/
source ../virtualenv/augur-spos/bin/activate
git stash
git pull
augur backend stop
sleep 10
augur backend kill
deactivate
@sgoggins
sgoggins / server-start-example.sh
Created July 2, 2021 18:26
A sample script for systematically testing multiple instances
#!/bin/bash
rm -rf virtualenv/augur-spos
rm -rf virtualenv/augur-zephyr
rm -rf virtualenv/augur-unicef
rm -rf virtualenv/augur-census
rm -rf virtualenv/augur-indeed
rm -rf virtualenv/augur-howison
rm -rf virtualenv/augur-jenkins
rm -rf virtualenv/augur-osshealth
@sgoggins
sgoggins / bulk-neo4j-import-original.sh
Created December 7, 2017 20:53 — forked from jexp/bulk-neo4j-import-original.sh
Panama Papers Import Scripts for Neo4j
export NEO4J_HOME=${NEO4J_HOME-~/Downloads/neo4j-community-3.0.1}
if [ ! -f data-csv.zip ]; then
curl -OL https://cloudfront-files-1.publicintegrity.org/offshoreleaks/data-csv.zip
fi
export DATA=${PWD}/import
rm -rf $DATA