Skip to content

Instantly share code, notes, and snippets.

Avatar
:electron:
Creating epic shit!

Romel Pérez romelperez

:electron:
Creating epic shit!
View GitHub Profile
View arwes-animation-animator-test-example.js
import React, { useState, useEffect } from 'react';
import { render, act, cleanup } from '@testing-library/react';
import { EXITED, EXITING, ENTERED, ENTERING } from '../constants';
import { useAnimator } from '../useAnimator';
import { Component as Animator } from './Animator.component';
jest.useFakeTimers();
afterEach(cleanup);
View atom.snippets.cson
# JAVASCRIPT
'.source.js, .source.ts, .source.tsx':
'Require':
'prefix': 'req'
'body': 'const ${1:module} = require(\'${1:module}\');'
'Module Exports':
'prefix': 'export'
'body': 'module.exports = $1;'
'Import':
'prefix': 'import'
@romelperez
romelperez / validator.js
Created Mar 11, 2018
Quick validation library
View validator.js
import isLength from 'validator/lib/isLength';
import isEmail from 'validator/lib/isEmail';
import isInt from 'validator/lib/isInt';
import isFloat from 'validator/lib/isFloat';
import matches from 'validator/lib/matches';
const required = value => !!value;
const isLengthMin = (value, min) => isLength(value, { min });
const isLengthMax = (value, max) => isLength(value, { max });
@romelperez
romelperez / linux-shortcuts.sh
Last active Dec 28, 2017
Linux shortcuts commands
View linux-shortcuts.sh
# Line count
find ./ -name '*.js' | xargs wc -l
# Convert webp files whithin directory to png
find ./ -name "*.webp" -exec dwebp {} -o {}.png \;
# Generate random string
< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32};echo;
View backups.sh
# backup
mongodump --db=mydb --archive=./backups/mydb.mongodump --authenticationDatabase=mydb -u username -p
# restore
mongorestore --drop --archive=./backups/mydb.mongodump --authenticationDatabase=mydb -u username -p
# export
mongoexport --db mydb --collection users --out ./test/fixtures/users.json --pretty --jsonArray
# import
@romelperez
romelperez / demos.html
Last active Jun 25, 2017 — forked from demonio/kuwy.css
KuWy from KumbiaPHP developers
View demos.html
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Kuwy</title>
<link rel="stylesheet" href="./kuwy.css">
<style>
body { margin: 20px; font-family: sans-serif; }
View atom.styles.less
/*
* Your Stylesheet
*
* This stylesheet is loaded when Atom starts up and is reloaded automatically
* when it is changed and saved.
*
* Add your own CSS or Less to fully customize Atom.
* If you are unfamiliar with Less, you can read more about it here:
* http://lesscss.org
*/
@romelperez
romelperez / atom.keymap.cson
Last active Feb 5, 2017
Atom keybinding map
View atom.keymap.cson
# Your keymap
#
# Atom keymaps work similarly to style sheets. Just as style sheets use
# selectors to apply styles to elements, Atom keymaps use selectors to associate
# keystrokes with events in specific contexts. Unlike style sheets however,
# each selector can only be declared once.
#
# You can create a new keybinding in this file by typing "key" and then hitting
# tab.
#
@romelperez
romelperez / jquery.plugin.js
Last active Nov 22, 2016
A jQuery plugin boilerplate
View jquery.plugin.js
const NAME = 'pluginName';
const methods = {
method1: function () {
const conf = this.data(`${NAME}-config`);
if (!conf) return this;
@romelperez
romelperez / vulcan-estudios-training.md
Last active Nov 21, 2016
vulcan-estudios-training.md
View vulcan-estudios-training.md

Capacitación

Metodologías

  • Cómo elegir la metodología correcta para cada equipo de desarrollo? Cuál es tu experiencia con metologías ágiles?
  • Cuál es tu herramienta favorita para llevar el tracking del proceso de desarrollo y la comunicación con los clientes?

General

  • Sobre testing: Cómo decidir qué testear? Teniendo en cuenta: tamaño, complejidad e inversión.