Skip to content

Instantly share code, notes, and snippets.

View jacefreeman's full-sized avatar

Jace Freeman jacefreeman

View GitHub Profile
@jacefreeman
jacefreeman / gist:a83d0e95ce1c1dc949fe72284d04f265
Created April 14, 2017 00:34
Vyos OpenVPN Client Configuration for ExpressVPN
# Download the OVPN file from ExpressVPN for the server you wish to access https://www.expressvpn.com/setup#manual
# Create files for certs and keys, use vi or nano, example is vi
cd /config/auth
sudo vi ca.cert
# type i and paste in your client certificate after <cert> up to </cert>
# type :wq
sudo vi cert.crt
# type i and paste in your certificate authority after <ca> up to </ca>
<# Import a CSV and use it to check for a files existence, writing the output to a file #>
<# Seems to output whole array instead of just the value, annoying #>
<# Fail 1#>
$csv = Import-csv .\no_files.csv | select-object -Property DocumentNo, AttachNo, AttTitle, FilePath | ForEach-Object { if ((Test-Path -Path $_.FilePath) -eq $true) { write-host "$_.FilePath exists"} else { write-host "$_.FilePath missing"}} | Export-CSV recfind_ledger.csv -NoTypeInformation
<# Succesful Code #>
Import-csv '.\no_files.csv' | select @{n='DecRegistrationNo';e={$_.DecRegistrationNo}}, @{n='Path'; e={$_.FilePath}}, @{n='Exists';e={Test-Path -LiteralPath $_.FilePath}} | Export-CSV 'csv_out.csv' -NoType
### Keybase proof
I hereby claim:
* I am jacefreeman on github.
* I am jace_freeman (https://keybase.io/jace_freeman) on keybase.
* I have a public key whose fingerprint is FA9A 054E 273C 62FA 6B19 A06E 68BD 0CC4 A1B7 2DF5
To claim this, I am signing this object: