Skip to content

Instantly share code, notes, and snippets.

View JuanM04's full-sized avatar

Juan Martín Seery JuanM04

View GitHub Profile
@JuanM04
JuanM04 / CMakeLists.txt
Last active May 9, 2025 23:36
Configuración de CMake para AVR
##################################################################################
# Configuración de CMake para proyectos de AVR
# Intenta emular el comportamiento de Microchip Studio
#
# Referencias:
# https://www.kuon.ch/post/2018-07-11-avr-cmake/
# https://github.com/mkleemann/cmake-avr/tree/642828d406e76a875ed2227309f3bf962fa7feaf
#
# Inicialzación de CMake:
# - Para crear una salida de debug:
@JuanM04
JuanM04 / raspberry.md
Created April 19, 2022 20:27
Headless Raspberry Pi

Headless Raspberry Pi Setup

  1. Flash a copy of Raspberry Pi OS into a MicroSD (you can use Etcher).
  2. Go to the boot drive (with Ubuntu, it's in /media/$USER/boot).
  3. Create an empty ssh file with no extension.
  4. And finally, create a wpa_supplicant.conf file with this data:
country=AR
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
@JuanM04
JuanM04 / README.md
Last active May 6, 2024 07:09
Install NVIDIA Container Toolkit on Fedora

Install NVIDIA Container Toolkit on Fedora

Last Updated: 2021-06-27
Tested on Fedora 34 (5.12.12-300.fc34.x86_64)

Install NVIDIA Drivers

First, add the RPM Fusion repositories:

@JuanM04
JuanM04 / README.md
Created May 2, 2021 00:13
VSCode Fedora Repo

VSCode Repo file

How to install:

sudo dnf config-manager --add-repo https://gist.githubusercontent.com/JuanM04/070c09de746f8d0e7727a9f4125b83db/raw/vscode.repo
sudo dnf install code
@JuanM04
JuanM04 / component.tsx
Created April 6, 2021 22:16
Sadly, the way to use Generics with forwardRef
interface Props<T extends unknown> {
// ...
}
export interface MyFormRef<T extends unknown> {
// ...
}
const MyForm = forwardRef(<T extends unknown>(props: Props<T>, ref: Ref<MyFormRef<T>>) => {
#!/usr/bin/zsh
TIMEOUT=2h
SERVER_URL=192.168.86.4
function stop_server {
docker stop media_server > /dev/null
}
trap "stop_server && exit 0" SIGINT
@JuanM04
JuanM04 / README.md
Last active March 29, 2021 18:37
Gitmoji commit template

Gitmoji Commit Template

You can generate a Commit Template for creating commits messages easier.

Steps

$ node gitmoji.js > your/commit/template.txt
$ git config --global commit.template your/commit/template.txt
@JuanM04
JuanM04 / style.css
Created September 12, 2020 14:09
CSS uploaded by scrapbook.hackclub.com/customizer
@font-face {
font-family: "Phantom Sans";
src: url(https://assets.hackclub.com/fonts/Phantom_Sans_0.7/Bold.woff);
font-weight: bold;
}
@font-face {
font-family: "Phantom Sans";
src: url(https://assets.hackclub.com/fonts/Phantom_Sans_0.7/Regular.woff);
}
{
"$id": "https://vercel.com/docs/configuration",
"$schema": "https://json-schema.org/draft-07/schema",
"title": "Vercel",
"type": "object",
"additionalProperties": false,
"properties": {
"functions": {
"$id": "project/functions",
"type": "object",
@JuanM04
JuanM04 / timezoneShifter.js
Created May 4, 2020 03:00
Timezone Shifter
/**
* Shift any Date timezone.
* @param {Date} date - Date to update.
* @param {string} timezone - Timezone as `-03:00`.
*/
function timezoneShifter(date, timezone) {
let isBehindGTM = false;
if (timezone.startsWith("-")) {
timezone = timezone.substr(1);
isBehindGTM = true;