Tested for: Win7
, Win10
, Win11
These two scripts are slightly modified from [1][1]:
- Alt+N will create a filename, with default name
notes.md
- Alt+F will create a folder, with default name of the current date in format
YYYY-MM-DD
Note:
#!/bin/bash | |
################################################################################ | |
# | |
# Shell script to pull zfs snapshots with syncoid using a list of key:value pairs | |
# Works with sendoptions=R, where syncoid's --recursive flag cannot be used | |
# | |
# IMPORTANT: Use bash, not sh! e.g.: > bash pull_snapshots.sh | |
# | |
################################################################################ |
Example to retrieve all WFS Features and store as shapefile with pandas and geopandas.
Setup:
conda create -n wfs_env -c conda-forge
conda activate wfs_env
conda install owslib geopandas requests
First, check capabilities in browser :
I have a number of monthly manual tasks that I could not automate so far.
One of them is getting PDF from login-protected websites, saving them in specific folders with naming conventions (renaming etc.) and uploading those to my nextcloud.
The script below is for my Electricity Provider's PDFs. They are behind a simple login form (user & pw) and uploaded for the past 6 months. I always forget to check regularly enough to download all.
Two key takeaways:
selenium/standalone-chrome
Docker imageThe instructions below are based on rupor-github/wsl-ssh-agent and benpye/wsl-ssh-pageant/issues/33.
Install dependencies:
sudo apt update && sudo apt install socat p7zip-full
Get npiperelay.exe
, store it on the Windows side and make it
available in Linux with correct permissions.
Just to memorize, these are the steps to setup webdriver (chrome) and svg-export as of Bokeh 2.4.3
/ Holoviews 1.14.8
This was tested in a Debian-based Docker container, but should work in most Linux distributions.
Install in your conda environment:
conda install selenium webdriver-manager -c conda-forge
The latest nextcloud server versions will have ransomware detection automatically
enabled, meaning that syncing common developer file types (e.g. .lock
) will return errors.
Fatal webdav OCA\DAV\Connector\Sabre\Exception\Forbidden: Ransomware file detected. Prevented upload of ..py/bokeh/secrets.tar.enc because it matches extension pattern ".enc"
If you are syncing complex, nested work directories as a developer, the following
Store userDefineLang_DockerfileDark.xml
at
%AppData%\Roaming\Notepad++\userDefineLangs\userDefineLang_DockerfileDark.xml
and select Language > Dockerfile
in Notepad++.
This color theme is specifically compatible with VS2015-Dark-Npp Theme.
<!DOCTYPE html><html> | |
<?php | |
$url = 'https://stackoverflow.com/questions/5710867/downloading-and-unzipping-a-zip-file-without-writing-to-disk&noredirect=1'; | |
$site = file_get_contents($url); | |
$site = preg_replace('#<div class="ff-sans ps-fixed z-nav-fixed ws4 sm:w-auto p32 sm:p16 bg-black-750 fc-white bar-lg b16 l16 r16 js-consent-banner">(.*?)</div>#s', ' ', $site); | |
$site = preg_replace('~<\s*\bscript\b[^>]*>(.*?)<\s*\/\s*script\s*>~is', ' ', $site); | |
echo $site | |
?> | |
</html> |