Skip to content

Instantly share code, notes, and snippets.

View ZappaBoy's full-sized avatar
Focusing

Zappone Federico ZappaBoy

Focusing
View GitHub Profile
@ayoubzulfiqar
ayoubzulfiqar / folder_structure.md
Created September 5, 2023 06:12
The Folder Structure for Every Golang Project

Go - The Ultimate Folder Structure

Organizing your Go (Golang) project's folder structure can help improve code readability, maintainability, and scalability. While there is no one-size-fits-all structure, here's a common folder structure for a Go project:

project-root/
    ├── cmd/
    │   ├── your-app-name/
    │   │   ├── main.go         # Application entry point
    │   │   └── ...             # Other application-specific files
@jfsso
jfsso / remove_docomo_bloatware_SC-51B.sh
Created May 21, 2021 01:56
Remove DoCoMo Bloatware on Galaxy S21 5G SC-51B
#!/bin/bash -x
# Confirmed most pre-installed DoCoMo bloatware were removed with this script on Galaxy S21 5G SC-51B.
# I recommend adjusting the script to your own preferences:
# It keeps some apps that I use, for example: Mobile Suica and Osaifu-Keitai.
# It removes other apps that I dislike: Facebook, Amazon and some others.
# Please understand that this script WILL remove and disable apps on your system and has risks of data loss or making the system unstable or inoperable.
# Taking backups before executing is ENCOURAGED. Run at your own risk. I do not take responsibility for any losses this script may cause.
@danii
danii / feh-multi-wallpaper-bg.sh
Created April 28, 2021 02:14
An over engineered script to use feh for multi-wallpaper desktops.
#!/bin/sh
AWK_XRANDR_PARSE='/ connected/ {
split($3,sizePos,"+")
split(sizePos[1],size,"x")
print size[1] "," size[2] "," sizePos[2] "," sizePos[3]
}'
# Fetches a wallpaper for the monitor of size $1x$2. $1 is the required width,
# and $2 is the required height.
@m-radzikowski
m-radzikowski / script-template.sh
Last active April 21, 2025 17:51
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@keilmillerjr
keilmillerjr / Creating an AUR Package.md
Last active April 8, 2025 01:36
How to create and manage an AUR package. #AUR #ARCH #makepkg #PKGBUILD
<h2> Inception Resnet V2 </h2>
# define input shape
INPUT_SHAPE = (298, 298, 3)
# get the Resnet model
resnet_layers = tf.keras.applications.InceptionResNetV2(weights='imagenet', include_top=False,
input_shape=INPUT_SHAPE)
resnet_layers.summary()
@huntrar
huntrar / full-disk-encryption-arch-uefi.md
Last active April 26, 2025 09:16
Arch Linux Full-Disk Encryption Installation Guide [Encrypted Boot, UEFI, NVMe, Evil Maid]

Arch Linux Full-Disk Encryption Installation Guide

This guide provides instructions for an Arch Linux installation featuring full-disk encryption via LVM on LUKS and an encrypted boot partition (GRUB) for UEFI systems.

Following the main installation are further instructions to harden against Evil Maid attacks via UEFI Secure Boot custom key enrollment and self-signed kernel and bootloader.

Preface

You will find most of this information pulled from the Arch Wiki and other resources linked thereof.

Note: The system was installed on an NVMe SSD, substitute /dev/nvme0nX with /dev/sdX or your device as needed.

@arjunv
arjunv / keyevents.json
Created December 2, 2018 00:01
All Android Key Events for usage with adb shell
{
"key_events": {
"key_unknown": "adb shell input keyevent 0",
"key_soft_left": "adb shell input keyevent 1",
"key_soft_right": "adb shell input keyevent 2",
"key_home": "adb shell input keyevent 3",
"key_back": "adb shell input keyevent 4",
"key_call": "adb shell input keyevent 5",
"key_endcall": "adb shell input keyevent 6",
"key_0": "adb shell input keyevent 7",
@ruzickap
ruzickap / headphones.sh
Created March 22, 2018 09:48
Short script which will move all audio (in/out)put to the USB Headphones
#!/bin/bash -eux
HEADSET="alsa_output.usb-Logitech_Logitech_USB_Headset-00.analog-stereo"
HEADSET_MIC="alsa_input.usb-Logitech_Logitech_USB_Headset-00.analog-mono"
#pacmd list-sink-inputs
#pacmd list-source-outputs
pacmd stat | grep -E '^Default (sink|source) name'
@Omar-Elrefaei
Omar-Elrefaei / radial.glsl
Created February 5, 2018 15:45
Radial config for Glava in (~/.config/glava/)
/* center radius (pixels) */
#define C_RADIUS 112
/* center line thickness (pixels) */
#define C_LINE 2
/* outline color --- (R, G, B, transparency)*/
#define OUTLINE vec4(0, 0, 0, 0)
/* number of bars (use even values for best results) */