Skip to content

Instantly share code, notes, and snippets.

View aserrallerios's full-sized avatar
🐦
Working or IDK

Albert Serrallé Ríos aserrallerios

🐦
Working or IDK
View GitHub Profile
@aserrallerios
aserrallerios / gha-errors.md
Created November 7, 2023 17:47
GHA error handling

GHA error handling info

  1. If a job fails, the whole workflow fails.
  2. If a step fails, the whole job fails.
  3. If a job is cancelled, the whole workflow is cancelled.
  4. If a step is cancelled, the whole job is cancelled.
  5. Every job/step can succeed/fail/cancel.
  6. The downstream jobs (with needs keyword) or following steps might decide to run, even when the previous jobs/steps have failed/cancelled, using the if keyword (but this won't change the status of the parent workflow/job):
    • always()
  • cancelled()
❯ rsync --version
rsync  version 3.2.6  protocol version 31
❯ rsync --dry-run -v --itemize-changes --stats --progress -rt --delete --iconv=utf-8-mac,utf-8 "freenas.local:/mnt/default/Nextcloud/data/yoli/files/" "/Volumes/SAMSUNG 970/backups/yoli/nextcloud/"
  • rt -> recursive + preserve update time
  • iconv -> this is required to avoid false positives filename changes if executed in mac

By default this configuration will update files if it either has different size or update time.

@aserrallerios
aserrallerios / macos.txt
Last active September 12, 2022 06:47
Mac tips
# Shortcuts
command + shift + period = show hidden files in open file dialogs
command + shift + G = go to path in open file dialogs
command + ^ + F = Fullscreen/restore window
command + H = Hide window
command + M = minimize window
command + option = restore minimized window (after selecting app with command + Tab)
@aserrallerios
aserrallerios / default.md
Created December 20, 2021 18:38
Get DHCP server and network info
ipconfig getpacket en0

Source

@aserrallerios
aserrallerios / kubernetes-cpu.md
Last active November 25, 2021 14:22
How CPU works in Kubernetes Pods
  • The spec.containers[].resources.requests.cpu is converted to its core value, which is potentially fractional, and multiplied by 1024. The greater of this number or 2 is used as the value of the --cpu-shares flag in the docker run command.
  • The spec.containers[].resources.limits.cpu is converted to its millicore value and multiplied by 100. The resulting value is the total amount of CPU time in microseconds that a container can use every 100ms. A container cannot use more than its share of CPU time during this interval.
kafka-connect (producer + transformation) -------------------------> kafka ------------------------------------------------------> kafka-connect (sink)
logstash (input plugin) ------------------------> kafka -----------> logstash (input + output plugin) -----> kafka --------------> logstash (output plugin)
alpakka ----------------------------------------> kafka -----------> alpakka ------------------------------> kafka --------------> alpakka
kafka -----------> kafka-streams ------------------------> kafka
@aserrallerios
aserrallerios / output_example.txt
Last active June 28, 2021 08:31
From: https://www.braillealphabetsoup.com/tag/freenas/ with additional section for NVMe drives
System Temperatures - Tue Aug 13 13:18:16 CEST 2019
System Load: 0.15, 0.22, 0.20
CPU Temperature:
dev.cpu.1.temperature: 37.0C
dev.cpu.0.temperature: 37.0C
HDD Temperature:
ada0: 35 C - WDC WD40EFRX-68N32N0 (WD-WCC7K1VYRPJ3)
ada1: 34 C - ST4000VN008-2DR166 (ZDH6FF4Q)