Skip to content

Commit

Permalink
urlwatch
Browse files Browse the repository at this point in the history
  • Loading branch information
jpcercal committed Dec 14, 2023
1 parent 4329950 commit aae726d
Show file tree
Hide file tree
Showing 13 changed files with 820 additions and 6 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@ name: MacOS Workflow
on: [push]

jobs:
shellcheck:
name: runner / shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: shellcheck
uses: reviewdog/action-shellcheck@v1
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
path: "."
pattern: "*.sh"
exclude: "./.git/*"
check_all_files_with_shebangs: "false"
dotfiles:
name: dotfiles
runs-on: macos-latest
Expand Down
28 changes: 28 additions & 0 deletions .zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ eval "$(pyenv init -)"
export GOPATH="$HOME/go"
export PATH="$GOPATH/bin:$PATH"

###########################################################
# rust

source "$HOME/.cargo/env"

###########################################################
# nvm

Expand Down Expand Up @@ -171,3 +176,26 @@ ZSH_AUTOSUGGEST_STRATEGY=atuin_top

export KUBECONFIG=~/.kube/config
export AWS_PROFILE="TXBTurboshopDeveloperAccess-440308253360"

###########################################################
# functions

gli() {
local filter
if [ -n $@ ] && [ -f $@ ]; then
filter="-- $@"
fi

git log \
--graph --color=always --abbrev=7 --format='%C(auto)%h %an %C(blue)%s %C(yellow)%cr' $@ | \
fzf \
--ansi --no-sort --reverse --tiebreak=index \
--preview "f() { set -- \$(echo -- \$@ | grep -o '[a-f0-9]\{7\}'); [ \$# -eq 0 ] || git show --color=always \$1 $filter; }; f {}" \
--bind "j:down,k:up,alt-j:preview-down,alt-k:preview-up,ctrl-f:preview-page-down,ctrl-b:preview-page-up,q:abort,ctrl-m:execute:
(grep -o '[a-f0-9]\{7\}' | head -1 |
xargs -I % sh -c 'git show --color=always % | less -R') << 'FZF-EOF'
{}
FZF-EOF" \
--preview-window=right:60% \
--height 80%
}
18 changes: 12 additions & 6 deletions apps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ install:
- "coreutils"
- "doctl"
- "exa"
- "fd"
- "ffmpeg"
- "findutils"
- "fswatch"
Expand All @@ -33,6 +34,7 @@ install:
- "gnu-sed"
- "go"
- "golangci-lint"
- "howdoi"
- "hr"
- "htmlq"
- "htop"
Expand Down Expand Up @@ -66,6 +68,7 @@ install:
- "terraform"
- "tldr"
- "tmux"
- "tpm"
- "tree"
- "unison"
- "vim"
Expand Down Expand Up @@ -150,7 +153,6 @@ install:
- "monitorcontrol"
- "moonlight"
- "nordvpn"
- "numi"
- "obs"
- "oracle-jdk"
- "parsec"
Expand All @@ -176,10 +178,13 @@ install:
- "brew link --overwrite awscli"
- "brew link --overwrite go"
- "brew link --overwrite [email protected]"
- "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y"
- "echo \"y\" | $(brew --prefix)/opt/fzf/install"
- "git lfs install"
- "go install github.com/oklog/ulid/v2/cmd/ulid@latest"
- "mkdir ~/.nvm"
- "mkdir -p ~/dotfiles/logs/crontab/"
- "crontab ~/dotfiles/crontab"
pyenv:
global:
version: 3.11.1
Expand All @@ -196,6 +201,7 @@ install:
global:
packages:
- "neovim"
- "prettier"
- "serverless"
mas:
apps:
Expand Down Expand Up @@ -290,11 +296,6 @@ config:
to:
absolute_path: "~/.vimrc"

- from:
relative_path: ".zsh_history"
to:
absolute_path: "~/.zsh_history"

- from:
relative_path: ".zshrc"
to:
Expand All @@ -304,6 +305,11 @@ config:
relative_path: "starship.toml"
to:
absolute_path: "~/.config/starship.toml"

- from:
relative_path: "tmux.conf"
to:
absolute_path: "~/.config/tmux/tmux.conf"
dockutil:
_before:
reset: true
Expand Down
1 change: 1 addition & 0 deletions crontab
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* * * * * echo abc > ~/dotfiles/logs/crontab/$(date +%Y.%m.%d.%H.%M.%S).mas-update.log 2>&1
52 changes: 52 additions & 0 deletions tmux.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
set-option -sa terminal-overrides ",xterm*:Tc"
set -g mouse on

unbind C-b
set -g prefix C-Space
bind C-Space send-prefix

# Vim style pane selection
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R

# Start windows and panes at 1, not 0
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on

# Use Alt-arrow keys without prefix key to switch panes
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D

# Shift arrow to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window

# Shift Alt vim keys to switch windows
bind -n M-H previous-window
bind -n M-L next-window

set -g @catppuccin_flavour 'mocha'

set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'dreamsofcode-io/catppuccin-tmux'
set -g @plugin 'tmux-plugins/tmux-yank'

run "/opt/homebrew/opt/tpm/share/tpm/tpm"

# set vi-mode
set-window-option -g mode-keys vi
# keybindings
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel

bind '"' split-window -v -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
103 changes: 103 additions & 0 deletions urlwatch/aima/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
display:
empty-diff: true
error: true
new: true
unchanged: false
job_defaults:
all: {}
browser: {}
shell: {}
url: {}
report:
email:
enabled: true
subject: '[AIMA] {count} changes: {jobs}'
from: [email protected]
to: [email protected]
method: smtp
smtp:
host: smtp.gmail.com
auth: true
port: 587
starttls: true
discord:
colored: true
embed: false
enabled: false
max_message_length: 2000
subject: '{count} changes: {jobs}'
webhook_url: ''
html:
diff: unified
separate: false
ifttt:
enabled: false
event: ''
key: ''
mailgun:
api_key: ''
domain: ''
enabled: false
from_mail: ''
from_name: ''
region: us
subject: '{count} changes: {jobs}'
to: ''
markdown:
details: true
footer: true
minimal: false
separate: false
matrix:
access_token: ''
enabled: false
homeserver: ''
room_id: ''
mattermost:
enabled: false
max_message_length: 40000
webhook_url: ''
prowl:
api_key: ''
application: ''
enabled: false
priority: 0
subject: '{count} changes: {jobs}'
pushbullet:
api_key: ''
enabled: false
pushover:
app: ''
device: null
enabled: false
priority: normal
sound: spacealarm
user: ''
shell:
command: ''
enabled: false
ignore_stderr: false
ignore_stdout: true
slack:
enabled: false
max_message_length: 40000
webhook_url: ''
stdout:
color: true
enabled: true
telegram:
bot_token: ''
chat_id: ''
enabled: false
monospace: false
silent: false
text:
details: true
footer: true
line_length: 75
minimal: false
separate: false
xmpp:
enabled: false
recipient: ''
sender: ''
33 changes: 33 additions & 0 deletions urlwatch/aima/jobs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: "Home"
url: "https://aima.gov.pt/pt/"
treat_new_as_changed: true
---
name: "Viver"
url: "https://aima.gov.pt/pt/viver"
treat_new_as_changed: true
---
name: "Estudar"
url: "https://aima.gov.pt/pt/estudar"
treat_new_as_changed: true
---
name: "Trabalhar"
url: "https://aima.gov.pt/pt/trabalhar"
treat_new_as_changed: true
---
name: "Serviços"
url: "https://aima.gov.pt/pt/a-aima/servicos"
treat_new_as_changed: true
---
name: "Lojas"
url: "https://aima.gov.pt/pt/a-aima/servicos/lojas-aima"
treat_new_as_changed: true
---
name: "A AIMA"
url: "https://aima.gov.pt/pt/a-aima"
treat_new_as_changed: true
---
name: "Notícias"
url: "https://aima.gov.pt/pt/noticias"
treat_new_as_changed: true
---
Loading

0 comments on commit aae726d

Please sign in to comment.