Skip to content

Instantly share code, notes, and snippets.

View wedwin53's full-sized avatar
🤖
Coding

Edwin Rebolledo wedwin53

🤖
Coding
View GitHub Profile
import React, { forwardRef } from "react";
import MaterialTable from "material-table";
import AddBox from "@material-ui/icons/AddBox";
import ArrowDownward from "@material-ui/icons/ArrowDownward";
import Check from "@material-ui/icons/Check";
import ChevronLeft from "@material-ui/icons/ChevronLeft";
import ChevronRight from "@material-ui/icons/ChevronRight";
import Clear from "@material-ui/icons/Clear";
import DeleteOutline from "@material-ui/icons/DeleteOutline";
import Edit from "@material-ui/icons/Edit";
@wedwin53
wedwin53 / patterns.java
Created February 15, 2021 16:02
Sort number in an array by given pattern
public class SpringRegistroApplication {
public static void main(String[] args) {
int[] input = {4,9,1,2,3, 6, 5, 8};
int[] pattern = {1,4,5,3,9,2};
List<Integer> result = new ArrayList<>();
Set<Integer> remainder = new HashSet<>();
//valor inicial a evaluar en el patron
@wedwin53
wedwin53 / detectEnter.js
Created January 21, 2021 23:39
detect enter on a react input component
import React, { useState } from "react";
import "./styles.css";
import WeekPlan from "./WeekPlan";
import dateFns from 'date-fns'
export default function App() {
const [block, setBlock] = useState([]);
const handleBlock = (e) => {
if (e.key === 'Enter') {
docker run -p 3306:3306 -d --name bestdocdb -e MYSQL_ROOT_PASSWORD=pass mariadb/server:10.4
@wedwin53
wedwin53 / firebase.js
Last active June 16, 2020 01:58
Firebase
#usuarios: al objeto en firebase
firebase.database().ref('usuarios').set('objeto con valores')
#otra manera el child es el objeto hijo
firebase.database().ref('usuarios').child('1').set('objeto con valores')
#manejo de errores
firebase.database().ref('usuarios')
.child('1')
.set('objeto con valores', fuction(error){
@wedwin53
wedwin53 / docker-compose-wordpress.yaml
Created May 1, 2020 00:26 — forked from pablokbs/docker-compose-wordpress.yaml
Docker-compose para wordpress con mysql
## docker-compose para correr wordpress con una base de datos en mysql
## by PeladoNerd https://youtu.be/eoFxMaeB9H4
version: '3.1'
services:
wordpress:
image: wordpress:php7.1-apache
ports:
@wedwin53
wedwin53 / dates-yyyyMMdd.js
Created February 1, 2019 02:56
Obtain the date formated yyyyMMdd
var f = new Date();
var currentMonth = f.getMonth() +1;
if (currentMonth < 10) { currentMonth = '0' + currentMonth; }
var today = f.getFullYear().toString() + currentMonth + f.getDate().toString();
@wedwin53
wedwin53 / api_google_maps_examples.js
Last active November 23, 2018 20:00
API GOOGLE MAPS
// LOCATIONS
var API_KEY = 'YOUR_API_KEY'
var API_KEY2 = 'YOUR_API_KEY2'// ONLY ONE NEEDED
var url = 'https://www.googleapis.com/geolocation/v1/geolocate?key='+API_KEY2;
var config = {
method: 'POST'
}