Skip to content

Instantly share code, notes, and snippets.

View fabricionaweb's full-sized avatar
👊

Fabricio fabricionaweb

👊
View GitHub Profile
@fabricionaweb
fabricionaweb / .zshrc
Created March 9, 2024 16:58 — forked from khongi/.zshrc
Unraid Zsh with persistent config
# This is your .zshrc, put it in /boot/config/extra/
export ZSH="/root/.oh-my-zsh"
ZSH_THEME="robbyrussell"
DISABLE_UPDATE_PROMPT="true"
plugins=(
zsh-autosuggestions
{
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.patterns": {
"package.json": "package-lock.json, .eslint*, .babel*, prettier*, tsconfig*, vite*, pnpm-lock*, bun.lockb, nest*",
"tailwind.config.js": "tailwind.config*, postcss.config*",
".env": ".env*",
}
}
@fabricionaweb
fabricionaweb / tschroot
Created August 21, 2023 08:25 — forked from schtobia/tschroot
Mount /tmp, /dev/pts, /dev/shm and /proc into chroot and change into chroot
#! /bin/sh
[ ! -d "$1" ] && echo "$1 is not a valid directory." && exit 1;
trap "umount \"${1}\"/tmp \"${1}\"/dev/null \"${1}\"/dev/pts \"${1}\"/dev/random \"${1}\"/dev/shm \"${1}\"/dev/urandom \"${1}\"/proc" EXIT INT TERM HUP PIPE &&
mount --bind /tmp "${1}/tmp" && \
mount --bind /dev/null "${1}/dev/null" && \
mount --bind /dev/pts "${1}/dev/pts" && \
mount --bind /dev/random "${1}/dev/random" && \
mount --bind /dev/shm "${1}/dev/shm" && \
mount --bind /dev/urandom "${1}/dev/urandom" && \
mount --bind /proc "${1}/proc" && \
# after the virtual disk has already been expanded (e.g. in proxmox)
apk add --no-cache cfdisk e2fsprogs-extra
# choose partition then "Resize" > "Write" (to finalize)
cfdisk
# replace * with partition you are resizing
resize2fs /dev/*
@fabricionaweb
fabricionaweb / lxc_plex_intel_quicksync.md
Created February 1, 2023 13:44 — forked from packerdl/lxc_plex_intel_quicksync.md
Intel QuickSync passthrough to an unprivileged LXC container running plex.

Running Plex in an Unprivileged LXC with Intel QuickSync Passthrough

First setup an unprivileged Ubuntu container with Plex Media Server installed. Inside the container take note of the id of the plex group.

# Your Plex group's ID may be different
$ getent group plex | cut -d : -f3
998
@fabricionaweb
fabricionaweb / webcrypto-examples.md
Created July 31, 2022 17:00 — forked from pedrouid/webcrypto-examples.md
Web Cryptography API Examples
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 / 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
@fabricionaweb
fabricionaweb / README.md
Created March 2, 2018 22:03 — forked from marcofugaro/README.md
Paste this in the console of your github profile page and start drawing on your contributions!

Made to work along with gitfiti, you can draw with this tool and then export the data and use it with gitfiti.

##Usage

  1. Paste the code in the console of any github profile page which has the contributions graph
  2. Start drawing! Left click to increment the color, right click to clear the cell, clear button to clear everything! Dragging also works!
  3. Once you're happy you can export the data by typing ContributionsDraw.export() into the console.
  4. Or if you want you can also import existing data with ContributionsDraw.import([...])

NOTE: This is developed for and tested in Chrome, other browsers might not support yet some ES6 stuff, you might need to compile it to ES5.

This is an variation of BEM/SUIT/RSCSS methodologies.

Utilities

You will not always need utility classes, but if you want to use then, do in this way.

Syntax: u-<utilityName>

.u-utilityName {}