Skip to content

Instantly share code, notes, and snippets.

View godie007's full-sized avatar

Diego Fernando Echevery godie007

View GitHub Profile
exports = module.exports = function (app) {
app.get('/users/', require('./views/Users/index').mostrar)
app.post('/users/', require('./views/Users/index').ingresar)
/**
* @autor:
* @date: 2017/08/24 17:53
* Correction in the link, wrong redirection
**/
app.post('/users/listar/', require('./views/Users/index').listar)
@godie007
godie007 / Lista.jsx
Created August 15, 2018 19:47
Bug al abrir modal, genera bucle
import React from "react";
import {
ControlLabel,
FormGroup,
FormControl,
Panel,
Button
} from "react-bootstrap";
import { connect } from "react-redux";
import ReactTable, { ReactTableDefaults } from "react-table";
@godie007
godie007 / cliente.js
Created August 10, 2018 01:23
subir archivos csv
script(src='/views/js/jquery.min.js')
script(src='/js/bootstrap.min.js')
script(src='/js/cargue.js')
script(src='/vendor/bootstrap/js/dropdown.js')
block body
div.page-header
div.col-sm-11
div(id="usuario", class="#{usuario}")
form.form-horizontal
@godie007
godie007 / Ejemplo.js
Last active July 25, 2018 00:18
Sistema de autenticacion con token
// configuración postman
header: {
x-access-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImRpZWdvIiwiaWF0IjoxNTMyNDc2NDE2LCJleHAiOjE1MzI0ODAwMTZ9.Ev-x8tQPkmnA6FAYgTts0W2LwWQITmzAPy6oomKRKVc
}
@godie007
godie007 / squid.conf
Last active March 20, 2018 08:35
Configuracion squid
# WELCOME TO SQUID 3.3.8
# ----------------------------
#
# This is the documentation for the Squid configuration file.
# This documentation can also be found online at:
# http://www.squid-cache.org/Doc/config/
#
# You may wish to look at the Squid home page and wiki for the
# FAQ and other documentation:
# http://www.squid-cache.org/
@godie007
godie007 / Pila.java
Created February 23, 2018 05:12
Código Ejemplo para programar una pila utilizado un arreglo de enteros
package ejemplopilaarreglo;
import java.util.Arrays;
/**
*
* @author Diego
*/
public class Pila {
@godie007
godie007 / dependencias.html
Last active February 4, 2018 04:22
Codigo Ejemplo Google Maps
<script src="/vendor/jquery/jquery.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDaqJrcvUyHQlDrV6gASSUr3Fi39NRSJLg&amp;v=3.exp&amp;libraries=places"></script>
<script src="/views/establecimiento/index.min.js?undefined"></script>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Prueba</title>
<style media="screen">
button#btn-accion {
color: red;
background: black;
padding: 10px 10px;
@godie007
godie007 / backReactNative.js
Created October 27, 2017 19:08
Back hardware react native
import { BackHandler } from 'react-native';
componentWillMount() {
BackHandler.addEventListener('hardwareBackPress', this.onBackPress.bind(this));
}
onBackPress(){
if(this.props.isAuthenticated){
const { state, dispatch } = this.props.navigation;
@godie007
godie007 / stringToObjectId.js
Created October 6, 2017 16:08
Convertir campos String a ObjectId MongoDB
db.getCollection('products').find().forEach(function (doc) {
db.getCollection('products').update({ _id : doc._id},{$set:{
"establishment":ObjectId(doc.establishment)
}});
}
);