Skip to content

Instantly share code, notes, and snippets.

View gvlx's full-sized avatar

Gerardo Lisboa gvlx

View GitHub Profile
@gvlx
gvlx / InstallOutlookCalDavSynchronizer.bat
Created November 12, 2020 18:27
Outlook CalDavSynchronizer manual installation
@ECHO OFF
::
:: from "Can't install on a virtual machine (no admin rights)" #227
:: https://github.com/aluxnimm/outlookcaldavsynchronizer/issues/227
::
@ECHO OFF
SET cdspath=
SET mode=2
SET regpath=HKCU\Software\Microsoft\Office\Outlook\Addins\CalDavSynchronizer.1
FOR /F "tokens=* USEBACKQ" %%g IN (`REG QUERY %regpath% /v Manifest 2^> nul`) do (SET cdspath=%%g)
@gvlx
gvlx / DownloadURLs.groovy
Last active May 10, 2022 16:26 — forked from sagrawal31/DownloadURLs.groovy
A simple Groovy script to scrape all URLs from a given string and download the content from those URLs
import java.util.regex.Matcher
import java.util.regex.Pattern
Pattern urlPattern = Pattern.compile("(https?|ftps?|file)://([-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|])",Pattern.CASE_INSENSITIVE);
String urlString = """This is a big string with lots of Image URL like: http://i.istockimg.com/file_thumbview_approve/69656987/3/stock-illustration-69656987-vector-of-flat-icon-life-buoy.jpg and
http://i.istockimg.com/file_thumbview_approve/69943823/3/stock-illustration-69943823-beach-ball.jpg few others below
http://i.istockimg.com/file_thumbview_approve/40877104/3/stock-photo-40877104-pollen-floating-on-water.jpg
http://i.istockimg.com/file_thumbview_approve/68944343/3/stock-illustration-68944343-ship-boat-flat-icon-with-long-shadow.jpg
abcdef
@gvlx
gvlx / PS-Helpers.ps1
Last active June 8, 2023 15:28
PowerShell helpers
<#
PowerShell one-liner helpers
#>
# find non-existent paths in current $PATH
# From https://stackoverflow.com/a/65505792/43408
($env:path).Trim(";").Split(";") | ? {-not (test-path $_ -ErrorAction Ignore)}
# simple file test
function Test-If-File-Exists {