Skip to content

Instantly share code, notes, and snippets.

View scharlton2's full-sized avatar

Charlton, Scott R. scharlton2

View GitHub Profile
@scharlton2
scharlton2 / README.md
Created February 27, 2024 16:44
Install .NET Framework 3.5 on Windows 11

Type 'Features' in the search bar and select 'Turn Windows features on or off'

image

Select the first option: '.NET Framework 3.5 (includes .NET 2.0 and 3.0)'

image

@scharlton2
scharlton2 / readme.md
Created January 9, 2024 16:35
RSPARROW Notes

List largest files

git rev-list --objects --all \
| git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' \
| sed -n 's/^blob //p' \
| sort --numeric-sort --key=2 \
| cut -c 1-12,41- \
| $(command -v gnumfmt || echo numfmt) --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest
@scharlton2
scharlton2 / readme.md
Last active February 2, 2024 19:54
install RSPARROW dependencies

see https://cran.r-project.org/bin/linux/ubuntu/fullREADME.html

(base) ➜  source sudo apt install r-cran-car r-cran-data.table r-cran-data.tree r-cran-dplyr r-cran-evaluate r-cran-formatr r-cran-gear r-cran-ggplot2 r-cran-gplots r-cran-gridextra r-cran-highr r-cran-htmlwidgets r-cran-inline r-cran-knitr r-cran-leaflet r-cran-leaflet.extras r-cran-mapview r-cran-markdown r-cran-nlmrt r-cran-numderiv r-cran-openmx r-cran-plotly r-cran-plyr r-cran-rhandsontable r-cran-rmarkdown r-cran-roxygen2 r-cran-rstan r-cran-rstudioapi r-cran-sf r-cran-shinycssloaders r-cran-shinywidgets r-cran-sp r-cran-spdep r-cran-stringr
[sudo] password for ******: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  gdal-data libaec0 libarmadillo10 libarpack2 libblosc1 libcfitsio9 libcharls2 libcmark-gfm-extensions0.29.0.gfm.3 libcmark-gfm0.29.0.gfm.3 libcurl4-gnutls-dev libde265-0 libdeflate-dev libfreexl1 libfyba0 libgdal30 li
@scharlton2
scharlton2 / macos-app-icon.md
Created September 22, 2022 20:51 — forked from jamieweavis/macos-app-icon.md
How to create an .icns macOS app icon
# CellBudgetFile2.py
import sys
import flopy.utils.binaryfile as bf
class CellBudgetFile2(bf.CellBudgetFile):
def __init__(self, filename, precision="auto", verbose=False, **kwargs):
super().__init__(filename, precision, verbose, **kwargs)
# Modflow6DataSource properties
self.hasSpecificDischargeData = bytes("{:>16}".format("DATA-SPDIS"), 'utf-8') in self.textlist
@scharlton2
scharlton2 / git-tag-delete-local-and-remote.sh
Created June 4, 2021 16:38 — forked from RomanSerikov/git-tag-delete-local-and-remote.sh
how to delete a git tag locally and remote
# 1. delete local tag '12345'
git tag -d 12345
# 2. delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# 3. alternative approach
git push --delete origin tagName
git tag -d tagName
# 4. delete many tags
@scharlton2
scharlton2 / check_utf.yml
Created September 8, 2020 23:52
example that uses PIPESTATUS
name: Check UTF-8
# This workflow is triggered on pushes to the repository.
on: push
# see https://tldp.org/LDP/abs/html/internalvariables.html#PIPESTATUSREF
jobs:
check_files:
runs-on: self-hosted
steps:
Set-PSReadLineOption -EditMode Emacs
# the next three lines require a powerline compatible font
# see https://docs.microsoft.com/en-us/windows/terminal/tutorials/powerline-setup
# Install-Module posh-git -Scope CurrentUser
# Install-Module oh-my-posh -Scope CurrentUser
# Install-Module -Name PSReadLine -Scope CurrentUser # for PowerShell Core
Import-Module posh-git
Import-Module oh-my-posh
Set-PoshPrompt -Theme paradox
### function prompt {'PS ' + "[$env:USERNAME@$env:COMPUTERNAME] " + $($executionContext.SessionState.Path.CurrentLocation) + "`n" + $(if ($NestedPromptLevel -ge 1) { '>>' }) + '> '}
@scharlton2
scharlton2 / kill_ie.ps1
Created April 17, 2018 21:31
kill all instances of internet explorer using powershell
Get-Process -Name iexplore | Stop-Process
@scharlton2
scharlton2 / sign_iric.cmd
Last active April 17, 2018 21:32
sign iric installer with usgs certificate
signtool sign /sha1 E3578BFC017322DD69FC287971FAD7CBBB906761 /t http://timestamp.verisign.com/scripts/timstamp.dll iRIC_Installer_180308.exe