Skip to content

Instantly share code, notes, and snippets.

View nahuelDev23's full-sized avatar
🏠
Working from home

Nahuel nahuelDev23

🏠
Working from home
View GitHub Profile
@malteneuss
malteneuss / Dockerfile
Created April 28, 2022 19:43
Nextjs + Prisma DB (query and migrations) in Docker
# Adapted from https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile
# Install dependencies only when needed
FROM node:16-alpine AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
# Rebuild the source code only when needed
@muZk
muZk / Product.jsx
Created October 5, 2020 01:16
MercadoPago React
import React, { useEffect, useState } from 'react';
import { useParams } from "react-router-dom";
const FORM_ID = 'payment-form';
export default function Product() {
const { id } = useParams(); // id de producto
const [preferenceId, setPreferenceId] = useState(null);
useEffect(() => {
@fwfurtado
fwfurtado / kitty.conf
Created June 4, 2020 14:48
Kitty terminal configuration
# vim:fileencoding=utf-8:ft=conf:foldmethod=marker
#: Fonts {{{
#: kitty has very powerful font management. You can configure
#: individual font faces and even specify special fonts for particular
#: characters.
font_family JetBrains Mono
bold_font auto
@identiq
identiq / Gif.js
Created November 25, 2018 17:37
Video preview generation (like giphy) with FFMPEG (ffmpeg-fluent) on node Serverless Lambda
const config = require('../config.json');
const fs = require('fs');
const _ = require('lodash');
const path = require('path');
const ffmpegPath = require('@ffmpeg-installer/ffmpeg').path;
const ffmpeg = require('fluent-ffmpeg');
ffmpeg.setFfmpegPath(ffmpegPath);
const AWS = require('aws-sdk');
const s3 = new AWS.S3({
@xpando
xpando / ArchLinuxNotes.md
Last active April 23, 2024 15:39
My notes on installing and configuring Arch Linux.
@posener
posener / go-table-driven-tests-parallel.md
Last active October 29, 2024 13:01
Be Careful with Table Driven Tests and t.Parallel()

Be Careful with Table Driven Tests and t.Parallel()

We Gophers, love table-driven-tests, it makes our unittesting structured, and makes it easy to add different test cases with ease.

Let’s create our table driven test, for convenience, I chose to use t.Log as the test function. Notice that we don't have any assertion in this test, it is not needed to for the demonstration.

func TestTLog(t *testing.T) {
	t.Parallel()
@Zardoz89
Zardoz89 / .nvimrc
Created October 20, 2014 17:39
My neovim configuration
set nocompatible " Use Vim defaults (much better!)
set runtimepath=~/.neovim/,$VIMRUNTIME
syntax on
filetype off " required!
if !has("unix")
" Vundle on Windows
set rtp+=~/vimfiles/bundle/Vundle.vim/