Skip to content

Instantly share code, notes, and snippets.

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 12, 2024 14:50
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@nathan818fr
nathan818fr / x570_aorus_master.conf
Last active May 12, 2024 14:46
lm-sensors config for X570 AORUS MASTER
# /etc/sensors.d/x570_aorus_master.conf
# Gigabyte X570 AORUS MASTER
#
# dmi: Board Manufacturer: Gigabyte Technology Co., Ltd.
# dmi: Board Product Name: X570 AORUS MASTER
#
# Require https://github.com/frankcrawford/it87
chip "acpitz-acpi-0"
# temp1 and temp2 are hardcoded and always returns 16.8°C
##
## Arch Linux repository mirrorlist
## Generated on 2023-10-27
##
## Bangladesh
Server = http://mirror.xeonbd.com/archlinux/$repo/os/$arch
## India
Server = http://mirror.4v1.in/archlinux/$repo/os/$arch
@loderunner
loderunner / 01-mac-profiling.md
Last active May 12, 2024 14:43
Profiling an application in Mac OS X

Profiling an application in Mac OS X

Finding which process to profile

If your system is running slowly, perhaps a process is using too much CPU time and won't let other processes run smoothly. To find out which processes are taking up a lot of CPU time, you can use Apple's Activity Monitor.

The CPU pane shows how processes are affecting CPU (processor) activity:

@REDVM
REDVM / immich_auto_album.py
Last active May 12, 2024 14:43
Create and populate albums on Immich based on folder name
import requests
import os
from collections import defaultdict
# I have photos in subfolders like :
# /mnt/media/Photos/2023-08 Holidays
# /mnt/media/Photos/2023-06 Birthday
# /mnt/media/Photos/2022-12 Christmas
# This script will create 3 albums
# 2023-08 Holidays, 2023-06 Birthday, 2022-12 Christmas
@wojteklu
wojteklu / clean_code.md
Last active May 12, 2024 14:39
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@marcoandre1
marcoandre1 / SSH-configuration-github-gitlab.md
Last active May 12, 2024 14:38
Managing SSH keys for Github and Gitlab

Managing SSH keys for Github and Gitlab

NOTICE: This guide will help you set ssh keys for GitHub and GitLab. However, this is not going to change your commit user.name or user.email. If you need to change those for specific repositories, just run the following commands while in your repository:

git config user.name "Your Name Here"
git config user.email your@email.com

For more info, see this answer. Also, keep in mind this only changes the .git folder inside your repository which never gets added/committed/pushed/uploaded.

I recently had to manage two ssh keys (one for Github and one for Gitlab). I did some research to find the best solution. I am justing putting the pieces together here.

@HiFiPhile
HiFiPhile / main.c
Last active May 12, 2024 14:38
TinyUSB uac2_speaker_fb minimal example on STM32F723E-DISCO
/*
* The MIT License (MIT)
*
* Copyright (c) 2020 Jerzy Kasenberg
* Copyright (c) 2023 HiFiPhile
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@aveuiller
aveuiller / packageAndroid.sh
Last active May 12, 2024 14:38
Extract the Android .odex files and package a new android.jar with the retrieved classes
#!/bin/sh
##
# Usage:
# ./convert.sh /path/to/framework /path/to/out $apiVersion $arch
#
# $arch is mandatory only in case of an ART system and defines the boot folder to use (arm, x86, x86_64).
##
frameworkDir=$1
# Final output directory