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 / 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 April 23, 2023 20:23
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;
@JuanM04
JuanM04 / to.json
Last active May 26, 2021 01:18
JuanM04 web
{"the-chosen-one":{"name":"THE CHOSEN ONE","url":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"},"kms-tools":{"url":"https://www.dropbox.com/s/osdli83vpnvbvuj/KMS%20Tools%2001-06-2019.rar?dl=1","name":"KMS Tools"},"pasetec-diseno":{"name":"PaseTec Diseño","url":"https://sketchviewer.com/sketches/5d65b1212ec0a900136815c3/latest/"},"caja":{"url":"https://www.tinkercad.com/things/ar901f6Wr27-epic-tumelo/edit?sharecode=5fv5AUnXbEjoA0CGVY6m_hdZZT8hXs_7-vGgWmP0W3k=","name":"caja"},"libros":{"name":"Libros","url":"https://docs.google.com/spreadsheets/d/1dpaiH9kaRk5Vu9sA2X8YEYwQH7gy7vD3C9FgWHuJo9I/edit?usp=sharing"},"share":{"name":"Share","url":"https://sharedrop.io"},"upload":{"name":"Upload","url":"https://file.coffee/"},"":{"name":"artwork","url":"https://bendodson.com/projects/itunes-artwork-finder/"},"c-n":{"name":"docker-nextjs","url":"https://kumar.now.sh/writings/next-js-docker-made-easy"},"pn":{"name":"Print","url":"https://www.youtube.com/watch?v=jeg_TJvkSjg"},"album-armonico":{"name":"Álbum Armónico","url"