Skip to content

Instantly share code, notes, and snippets.

@javiergomezve
javiergomezve / vite-testing-config.md
Created September 5, 2022 02:45 — forked from Klerith/vite-testing-config.md
Vite + Jest + React Testing Library - Configuraciones a seguir

Instalación y configuracion de Jest + React Testing Library

En proyectos de React + Vite

  1. Instalaciones:
yarn add --dev jest babel-jest @babel/preset-env @babel/preset-react 
yarn add --dev @testing-library/react @types/jest jest-environment-jsdom
  1. Opcional: Si usamos Fetch API en el proyecto:
@javiergomezve
javiergomezve / index.js
Created November 4, 2021 00:49 — forked from codigoconjuan/index.js
Guía para instalar React Navigation 5
// Instalar react-navigation/native
npm install @react-navigation/native
// Instalar las dependencias
npm install react-native-reanimated react-native-gesture-handler react-native-screens react-native-safe-area-context @react-native-community/masked-view
// Instalar navegación en Stack
npm i @react-navigation/stack
@javiergomezve
javiergomezve / create-zip.js
Created July 30, 2021 20:59 — forked from branneman/create-zip.js
Node.js script to create a zip file from a list of files and directories
const stat = require('fs').statSync;
const AdmZip = require('adm-zip');
/**
* Example usage
*/
newArchive(`test-${+new Date}.zip`, [
'index.js',
'package.json',
'node_modules'
@javiergomezve
javiergomezve / pipenv_cheat_sheet.md
Created May 10, 2021 13:08 — forked from bradtraversy/pipenv_cheat_sheet.md
Pipenv cheat sheet for common commands

Pipenv Cheat Sheet

Install pipenv

pip3 install pipenv

Activate

pipenv shell
{{-- You do not need to add this component if you are using the permanent option in the head component --}}
<script>
if (!window.sessionTimerPermanent && window.Livewire) {
window.livewire.hook('afterDomUpdate', startSessionTimer)
}
// if you are on livewire > 1.3.1 and want to avoid the default error alert
// https://github.com/livewire/livewire/pull/1146
window.livewire.onError(statusCode => {
if (statusCode === 419) {
@javiergomezve
javiergomezve / Annotation.js
Created March 5, 2020 14:58 — forked from SerafimArts/Annotation.js
JavaScript Annotations example
import Reader from './Reader';
import Target from './Target';
/**
* This is default annotation property for automatic type casting:
* <code>
* @Annotation({ some: any })
* // => will be casts "as is" {some: any}
*
* @Annotation("any")
@javiergomezve
javiergomezve / react-file-upload.js
Created November 20, 2019 02:24 — forked from AshikNesin/react-file-upload.js
Simple React File Upload
import React from 'react'
import axios, { post } from 'axios';
class SimpleReactFileUpload extends React.Component {
constructor(props) {
super(props);
this.state ={
file:null
}
@javiergomezve
javiergomezve / django_crash_course.MD
Created September 28, 2019 22:36 — forked from bradtraversy/django_crash_course.MD
Commands for Django 2.x Crash Course

Django Crash Course Commands

# Install pipenv
pip install pipenv
# Create Venv
pipenv shell
@javiergomezve
javiergomezve / phpunit.xml
Created September 5, 2019 21:36 — forked from viralsolani/phpunit.xml
phpunit.xml Laravel 5.4 with sqlite memory database
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="bootstrap/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
@javiergomezve
javiergomezve / media-query.css
Created December 15, 2018 16:46 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS