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
# Restart Adapter when not UP (intel i225-v and i226-v issue workaround) | |
# Script developed by pduchnovsky | |
# https://duchnovsky.com/2023/02/automated-adapter-restart/ | |
$AdapterName = "Ethernet" | |
$PowerShellPath = "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" | |
$Argument = "-command `"Get-NetAdapter $AdapterName | ? status -ne up | Restart-NetAdapter`"" | |
$Name = "Restart Adapter" | |
$Trigger = New-ScheduledTaskTrigger -AtStartup | |
$Action = New-ScheduledTaskAction -Execute $PowerShellPath $Argument | |
$Settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -ExecutionTimeLimit 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
<!-- layouts/_default/_markup/render-image.html --> | |
<!-- Developed/Adapted by pduchnovsky, https://duchnovsky.com/2020/11/native-image-lazy-load/ --> | |
{{ $img := "" }}{{ $thumb := "" }}{{ $srcset := slice }} | |
{{ $src := ( .Destination | safeURL ) }} | |
{{ $alt := .PlainText }} | |
{{ $caption := .Title | safeHTML }} | |
{{ $imgPath := add "/content" $src }} | |
{{ if fileExists $imgPath }} | |
{{ $img = imageConfig $imgPath }} |
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
img { | |
height: auto; | |
pointer-events: none; | |
-webkit-touch-callout: none; /* iOS Safari */ | |
-webkit-user-select: none; /* Safari */ | |
-khtml-user-select: none; /* Konqueror HTML */ | |
-moz-user-select: none; /* Old versions of Firefox */ | |
-ms-user-select: none; /* Internet Explorer/Edge */ | |
user-select: none; /* Non-prefixed version, currently | |
supported by Chrome, Edge, Opera and Firefox */ |
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
<!-- Adapted/developed by pduchnovsky, https://duchnovsky.com/2020/11/disqus-on-click-for-hugo/ --> | |
{{- if and (not (eq (.Site.DisqusShortname | default "") "")) (eq (.Params.disableComments | default false) false) -}} | |
{{- if .Site.Params.disqusOnClick -}} | |
{{- $pc := .Site.Config.Privacy.Disqus -}} | |
{{- if not $pc.Disable -}} | |
{{- if .Site.DisqusShortname -}} | |
<section id="disqus" style="text-align: center"> | |
<button | |
class="disqus-comment-count" | |
data-disqus-identifier="{{ .File.UniqueID }}" |
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
#!/bin/bash | |
# Script adapted by pduchnovsky | |
# https://duchnovsky.com/2020/11/images-optimization-for-web/ | |
# Add list of folder names to ignore array here, separated by space | |
ignore=("./themes/*" "./resources/*" "./assets/*") | |
# Array of png optimizers with their arguments | |
optimizers=( | |
"optipng -nb -nc" |
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
#!/bin/bash | |
# Script developed by pduchnovsky | |
# https://duchnovsky.com/2020/11/bitbucket-pipelines-monitoring/ | |
#Variables definition: | |
BITBUCKET_CREDS="username:app_password" | |
BITBUCKET_WORKSPACE="workspace-name" | |
BITBUCKET_REPO_LIST="repo-1 repo-2 repo-3" | |
BITBUCKET_BRANCH_LIST="primary secondary tertiary" |