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
license: apache-2.0 |
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
" Don't try to be vi compatible | |
set nocompatible | |
" Helps force plugins to load correctly when it is turned back on below | |
filetype off | |
" TODO: Load plugins here (pathogen or vundle) | |
" Turn on syntax highlighting | |
syntax on |
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
// this function will work cross-browser for loading scripts asynchronously | |
function loadScript(src) { | |
return new Promise(function(resolve, reject) { | |
const s = document.createElement('script'); | |
let r = false; | |
s.type = 'text/javascript'; | |
s.src = src; | |
s.async = true; | |
s.onerror = function(err) { | |
reject(err, s); |
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
//bind onclick to downloadcsv. | |
//o should be the json you want to turn into a table | |
//h should be a string array for the header row, or this can be null and it will use the keys from the first record | |
//n is the name of the file, csv will be appended. if omitted it will just be 'data.csv' | |
export const downloadcsv = (o,h,n = 'data') => { | |
downloadFile( toCSV(o,h) , n + '.csv', 'text/csv' ); | |
} | |
const toCSV = (o,h) => { | |
const a = (v) => `"${v.join(`","`)}"` | |
let csv = [] |
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
## | |
# POWERSHELL SPECIFIC | |
## | |
Set-Alias clr clear # slight contraction of clear command | |
function brc { Start notepad "C:\Users\kzimmerman012\Documents\PowerShell\profile.ps1" } # for editing this file | |
function Reload-PowerShell { Start-Process pwsh; exit } # reload PowerShell Core | |
Set-Alias relo Reload-PowerShell | |
function lw { dir | fw } # wide listing | |
function up { cd .. } # better back | |
function rmraf { Remove-Item -Recurse -Force $args[0] } |
OlderNewer