View NoteField.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// NoteField.swift | |
// | |
// Created by Floyd Noel on 7/11/21. | |
// | |
import SwiftUI | |
struct NoteField: View { | |
var label: String |
View getSearchParams.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getSearchParams = () => | |
window.location.search | |
.substring(1) | |
.split('&') | |
.reduce((acc, searchParam) => { | |
const [name, value] = searchParam.split('='); | |
return { ...acc, [name]: value }; | |
}, {}); |
View forgetAboutCors.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// takes a string URL, and returns a string URL which allows the request to proceed without CORS blocking | |
const forgetAboutCors = u => `https://cors-anywhere.herokuapp.com/${u}` | |
// example usage: forgetAboutCors(`https://clinicaltrials.gov/ct2/show/${'NCT03512561'}?displayxml=true`) |
View scriptAlreadyLoaded.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const scriptAlreadyLoaded = urlString => Array.prototype.slice.call(document.scripts).filter(s => s.src).map(s => s.src).contains(urlString) |
View git-ignore-cleaner.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Cleaning up any git ignored files..." | |
# copy and paste the line below to get the same results as running this script | |
git rm --cached `git ls-files -ic --exclude-from=.gitignore` | |
echo "Finished clean up." | |
# source: https://stackoverflow.com/questions/13541615/how-to-remove-files-that-are-listed-in-the-gitignore-but-still-on-the-repositor/13541721 |