This file contains hidden or 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 | |
# parameters | |
CF_API_EMAIL= | |
CF_API_KEY= | |
# specify the id for a zone (domain) | |
# get it via the Cloudflare Dashboard | |
# of via flarectl: https://github.com/cloudflare/cloudflare-go/tree/master/cmd/flarectl | |
CF_ZONE= |
This file contains hidden or 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 | |
# tested with traefik v2.4.8 | |
ACME_FILE="acme.json" | |
# get jq from https://stedolan.github.io/jq/ | |
SELECTED_DOMAINS=$(jq -r '.letsencrypt.Certificates[].domain.main' "$ACME_FILE" | fzf -m --height '40%' --reverse --border) | |
if [[ -z "$SELECTED_DOMAINS" ]]; then |
This file contains hidden or 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
@echo off | |
FOR /F "tokens=* USEBACKQ" %%F IN (`powershell "Get-NetRoute -DestinationPrefix '0.0.0.0/0', '::/0' | Sort-Object -Property { $_.InterfaceMetric + $_.RouteMetric } | Select-Object -First 1 | %% {$_.ifIndex}"`) DO ( | |
SET mainIfIndex=%%F | |
) | |
ECHO %mainIfIndex% | |
powershell "Set-DNSClientServerAddress -InterfaceIndex %mainIfIndex% -ServerAddresses ('1.1.1.1','1.0.0.1')" | |
powershell "Set-DNSClientServerAddress -InterfaceIndex %mainIfIndex% -ServerAddresses ('2606:4700:4700::1111','2606:4700:4700::1001')" | |
ipconfig /flushdns |
This file contains hidden or 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 | |
last_check='' | |
skip_next_confirm="false" | |
function skipNextConfirm { | |
skip_next_confirm="true" | |
return 0 | |
} |
This file contains hidden or 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
diff --git a/themes/avit.zsh-theme b/themes/avit.zsh-theme | |
index 1e20d8f9..4bcd54a0 100644 | |
--- a/themes/avit.zsh-theme | |
+++ b/themes/avit.zsh-theme | |
@@ -5,12 +5,19 @@ typeset +H _current_dir="%{$fg_bold[blue]%}%3~%{$reset_color%} " | |
typeset +H _return_status="%{$fg_bold[red]%}%(?..⍉)%{$reset_color%}" | |
typeset +H _hist_no="%{$fg[grey]%}%h%{$reset_color%}" | |
-PROMPT=' | |
-$(_user_host)${_current_dir} $(git_prompt_info) $(ruby_prompt_info) |
This file contains hidden or 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
{ | |
"title": "DrJume Karabiner-Elements complex modifications (v2.1)", | |
"rules": [ | |
{ | |
"description": "Spacebar: Hold and combine with HJKL for vi movement keys", | |
"manipulators": [ | |
{ | |
"conditions": [ | |
{ | |
"name": "spacebar pressed", |
This file contains hidden or 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 | |
pmset -g custom | sed -nE -e '/Battery Power/,/AC Power/p' | sed -e '1d' -e '$d' | sort > battery.pmset | |
pmset -g custom | sed -nE -e '/AC Power/,$p' | sed '1d' | sort > ac.pmset | |
sdiff <(echo "Battery Power:"; cat battery.pmset) <(echo "AC Power:"; cat ac.pmset) |
OlderNewer