Skip to content

Instantly share code, notes, and snippets.

View fabricionaweb's full-sized avatar
👊

Fabricio Silva fabricionaweb

👊
View GitHub Profile
@fabricionaweb
fabricionaweb / deletelocalbranches.sh
Created November 13, 2019 15:40 — forked from moiseshilario/deletelocalbranches.sh
Delete local branches (git)
# Delete branches that are already merged (but master/development/stage)
git branch --merged | egrep -v "(^\*|master|development|stage)" | xargs git branch -d
# Delete all local branches (but master/development/stage)
git branch | egrep -v "(^\*|master|development|stage)" | xargs git branch -D
FROM mhart/alpine-node:10 AS builder
WORKDIR /app
COPY package.json .
RUN yarn install
COPY . .
RUN yarn build && yarn --production
FROM mhart/alpine-node:10
WORKDIR /app
COPY --from=builder /app .
@fabricionaweb
fabricionaweb / rpi-arch.md
Last active January 19, 2021 21:30
Raspberry NAS

Arch Linux ARM on Raspberry Pi 4

Format your sdcard to FAT on system's disk utils before start to remove every old linux systems.

Prepare sdcard (on linux)

  1. Get your disk with lsblk
  2. Umount all partitions sudo umount /dev/sdX?
    yes, with ? at end, just replace the X with your disk, should be like sudo umount /dev/sda?
  3. Open fdisk sudo fdisk /dev/sdX
on alfred_script(q)
if application "iTerm2" is running or application "iTerm" is running then
run script "
on run {q}
tell application \"iTerm\"
activate
try
select first window
set onlywindow to false
on error
@fabricionaweb
fabricionaweb / bkp.yml
Last active February 15, 2022 16:44
My Raspberry Pi docker-compose files
version: '3'
services:
backup:
image: johannmx/vaultwarden_backup:latest
network_mode: none
volumes:
- /etc/localtime:/etc/localtime:ro
- /share/Private/Valtwarden:/data:ro
- /share/Private/Backups:/backups
@fabricionaweb
fabricionaweb / webcrypto-examples.md
Created July 31, 2022 17:00 — forked from pedrouid/webcrypto-examples.md
Web Cryptography API Examples
@fabricionaweb
fabricionaweb / qbit_resume_pause.sh
Last active March 30, 2023 14:26
Pause/Resume qbittorrent bash script
#!/bin/bash -e
# qbit settings
QBIT_API="http://qbittorrent.lan:8080/api/v2"
# tag to filter by, it will be removed on resume command
TAG="cache"
# days to filter in epoch time
# DAYS_OLD=$(date -d "-1 days" +%s)
# read value from ca.mover.tunning
CA_SETTINGS=$(cat /boot/config/plugins/ca.mover.tuning/ca.mover.tuning.cfg | awk -F '"' '/daysold/{print $2}')
@fabricionaweb
fabricionaweb / on_rename_notification.sh
Last active September 16, 2022 18:16
Sonarr Telegram notification for Rename episode trigger
#!/bin/bash
# --------
# SETTINGS
CHAT_ID=""
BOT_TOKEN=""
# --------
old=$(basename "/$sonarr_episodefile_previousrelativepaths")
new=$(basename "/$sonarr_episodefile_relativepaths")
@fabricionaweb
fabricionaweb / generate-self-ca-cert.sh
Created September 24, 2022 15:06
Self generate ca certs
#!/bin/bash
# print usage
DOMAIN=$1
if [ -z "$1" ]; then
echo "USAGE: $0 tld"
echo ""
echo "This will generate a non-secure self-signed wildcard certificate for "
echo "a given development tld."
echo "This should only be used in a development environment."