Skip to content

Instantly share code, notes, and snippets.

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

José Muñoz Ruiz josemunozr

🏠
Working from home
View GitHub Profile
@josemunozr
josemunozr / sortable-column.directive.ts
Last active April 13, 2021 15:23
sortable-column directive Angular
import { Directive, HostListener, Input, Output, Renderer2, EventEmitter, ElementRef, AfterViewInit} from '@angular/core';
import { ISortDirection, SortDirection } from 'src/app/interfaces/i-sort-direction';
@Directive({
selector: '[sortable-column]'
})
export class SortableColumnDirective implements AfterViewInit {
rotate: object;
@Input() sortable: string;
@josemunozr
josemunozr / .env.example
Created July 28, 2020 12:30
Implementación CRUD básico MongoDB
//CONFIG
PORT=
CORS=*
//MONGO
DB_USER=
DB_PASSWORD=
DB_HOST=
DB_NAME
@josemunozr
josemunozr / .babelrc
Last active June 8, 2020 12:07
configuración base para proyecto simple de ReactJs
{
"presets": ["@babel/preset-env", "@babel/preset-react"]
}
@josemunozr
josemunozr / gravatar.js
Created May 14, 2020 11:58
gravatar.js
import md5 from 'md5';
const gravatar = (email) => {
const base = 'https://gravatar.com/avatar/';
const formattedEmail = email.trim().toLowerCase();
const hash = md5(formattedEmail, { encoding: 'binary' });
return `${base}${hash}`;
};
export default gravatar;
@josemunozr
josemunozr / .babelrc
Created May 2, 2020 03:12
config async/await .babelrc and userEfect() react
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"esmodules": true
}
}
],
@josemunozr
josemunozr / gist:4b08015708706c0d840494de630a24a2
Created October 15, 2018 03:45
issues errors react-native run-android
https://github.com/facebook/react-native/issues/21490#issuecomment-427240356
https://github.com/react-community/lottie-react-native/issues/269#issuecomment-403497462
@josemunozr
josemunozr / sketch-never-ending.md
Created May 24, 2018 18:29 — forked from Bhavdip/sketch-never-ending.md
Modify Sketch to never ending trial

###Sketch trial non stop

Open hosts files:

$ open /private/etc/hosts

Edit the file adding:

127.0.0.1 backend.bohemiancoding.com

127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com

@josemunozr
josemunozr / index.html
Created January 30, 2018 14:43
css-grid-example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Css Grid example</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
// File: Gulpfile.js
'use strict';
var gulp = require('gulp'),
webserver = require('gulp-webserver'),
connect = require('gulp-connect'),
stylus = require('gulp-stylus'),
nib = require('nib'),
jshint = require('gulp-jshint'),
stylish = require('jshint-stylish'),
@josemunozr
josemunozr / webpack.config.js
Created January 18, 2017 01:02
Example configuration webpack with loaders [babel{es2015, react}]
module.exports ={
resolve: {
extensions: ['', '.js','.jsx']
},
context: __dirname,
entry: {
app: ['./src/app.jsx']
},
output: {
path: './build',