tell application "Terminal"
do script "echo Hello world"
end telltell application "iTerm"
set newWindow to (create window with default profile)
tell current session of newWindow| #!/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) |
| { | |
| "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", |
| 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) |
| #!/bin/bash | |
| last_check='' | |
| skip_next_confirm="false" | |
| function skipNextConfirm { | |
| skip_next_confirm="true" | |
| return 0 | |
| } |
| @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 |
| #!/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 |
| #!/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= |
| /** | |
| * @typedef API | |
| * @property {object} users | |
| * @property {()} users.getById | |
| * @property {()} users.getByName | |
| */ | |
| /** @returns {API} */ | |
| function ProxyFactory() { | |
| return Proxy({}, handler) |
tell application "Terminal"
do script "echo Hello world"
end telltell application "iTerm"
set newWindow to (create window with default profile)
tell current session of newWindow| #!/bin/sh | |
| [ ! -x "$(command -v dialog)" ] && ( apk add dialog || exit) | |
| installed_pkgs=$(apk list -I -q | awk '{ print $1 }' | sed -E 's/(.+)(-[[:digit:]]).+/\1/') | |
| installed_pkgs_doc=$(echo "$installed_pkgs" | grep "\-doc") | |
| installed_pkgs_without_doc=$(echo "$installed_pkgs" | grep -v '\-doc') | |
| installed_pkgs_append_doc=$(echo "$installed_pkgs_without_doc" | awk '{ print $0"-doc" }') |