Skip to content

Instantly share code, notes, and snippets.

View iandark's full-sized avatar
:electron:

Derkian Afonso iandark

:electron:
  • Juiz de Fora, Brazil
View GitHub Profile
@iandark
iandark / archbook_facetime.sh
Created July 8, 2025 13:34
Script to install and configure the FaceTime HD camera driver and firmware on Arch Linux with Wayland.
#!/bin/bash
set -e
echo "[0/5] Checking basic dependencies..."
if ! command -v cpio &> /dev/null; then
echo "cpio not found, installing..."
sudo pacman -S --noconfirm cpio
fi
echo "[1/5] Installing dependencies..."
@iandark
iandark / arch_without_systemd.sh
Created April 17, 2025 16:28
Arch_without_systemd
#!/bin/bash
set -e
# Configurações
DISK="/dev/nvme0n1"
HOSTNAME="ArchBook"
USERNAME="derkian"
USERPASS="derkian"
LOCALE="pt_BR.UTF-8 UTF-8"
LANGUAGE="pt_BR.UTF-8"
@iandark
iandark / arch-linux_fix_bcm4360.md
Created April 1, 2025 22:31
Arch Linux - Install broadcom bcm4360 - Wifi wireless driver (macbook air/pro)

1 - Install kernel headers and Broadcom driver

sudo pacman -Syu linux-headers broadcom-wl-dkms
2 - Generate new initramfs image
sudo mkinitcpio -p linux
@iandark
iandark / arch-linux_fix_networkmanager_and_dhcpcd.md
Last active April 1, 2025 22:35
Arch Linux - Fix networkmanager & dhcpcd

While installing Arch Linux with Broadcom BCM4360, you need to install and configure NetworkManager and dhcpcd while on chroot.

If you, like me, skipped the configuration of these during chroot, and the internet stopped working after the installation, don’t worry, I’ve got you covered.

1. Plug in your installation media. In the terminal of the installation media, identify the disk where Arch is installed:
lsblk
2. After discovering which partition your system is installed on, you must mount it. Replace sdXn with the correct name of the partition:
@iandark
iandark / broadcom_bcm4360_macbook_debian.txt
Created April 1, 2025 12:50
How to install Broadcom BCM4360 on debian on Macbook
1 - Enable the nonfree repos. By adding "non-free" to your "/etc/apt/sources.list" file or do it in "Software & Updates" app.
2 - Run the following commands:
sudo apt-get update
sudo apt-get install broadcom-sta-*
3 - If this does not work, you must compile your kernel with the driver;
sudo apt-get install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') broadcom-sta-dkms
@iandark
iandark / user_to_sudoers.txt
Created April 1, 2025 12:43
Add User to Sudoers in Debian
1 - Adding a User to the sudo Group
The easiest way to give a user sudo access is to add them to the sudo group. By default, Debian is configured in a way that members of the sudo group are permitted to use the sudo command.
sudo usermod -aG sudo username
Replace username with the name of the user you want to grant sudo privileges.
2 - Verify the User is Part of the sudo Group
To ensure the user has been added to the group, you can use the groups command:
@iandark
iandark / HTMLClassIDAccentRemover.py
Created March 31, 2024 12:39
This Python script is designed to remove accents from the values of class and ID attributes within an HTML file. It reads the content of the specified HTML file and utilizes regular expressions to identify and target the values associated with class and id attributes.
import re
import unidecode
def remove_accents(text):
return unidecode.unidecode(text)
def replace_function(match):
return match.group(0).replace(match.group(2), remove_accents(match.group(2)))
file_path = 'file.html'
@iandark
iandark / youtube_playlist_videos_sorter.py
Created March 16, 2024 06:50
Python script providing a sorted list of videos from a specific YouTube channel based on video duration
from googleapiclient.discovery import build
import re
youtube = build('youtube', 'v3', developerKey='API_KEY')
channel_id = 'CHANNEL_ID'
def get_uploads_playlist_id(channel_id):
response = youtube.channels().list(
part='contentDetails',
@iandark
iandark / smart-mirroring-bare.sh
Created August 8, 2023 20:15
This is a git mirror bare script
#!/bin/bash
# Hey, this is a mirroring bare script, but if you just want a simple backup try this: https://gist.github.com/iandark/d79d08a75f444647afa82744af8fea60
# This shell script reads a CSV file, where you can pass an origin repository and makes a whole backup into another repository.
#
# The expected format of the CSV file is below.
#
# +--------------------------------------------+-----------------------------------------------+
# | Origin | Backup |
# +--------------------------------------------+-----------------------------------------------+
@iandark
iandark / mac-homebrew-lamp.md
Last active June 11, 2025 23:15 — forked from kitloong/mac-homebrew-lamp.md
Mac - Install Apache, PHP, MySQL + phpMyAdmin with Homebrew

Homebrew is required for this tutorial

PHP

Install PHP
brew install php