Skip to content

Instantly share code, notes, and snippets.

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

Gutierrez Tineo, Cesar tineo

🏠
Working from home
  • NTT DATA EMEAL
  • Lima, Peru
View GitHub Profile
@tineo
tineo / start_docker_registry.bash
Created March 10, 2021 04:16 — forked from u1i/start_docker_registry.bash
Start docker registry with letsencrypt certificates and Basic Auth
#!/usr/bin/env bash
# install docker
# https://docs.docker.com/engine/installation/linux/ubuntulinux/
# install docker-compose
# https://docs.docker.com/compose/install/
# install letsencrypt
# https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04
@tineo
tineo / Setup ELK Stack with Spring Boot.md
Created January 21, 2021 03:20 — forked from pavankjadda/Setup ELK Stack with Spring Boot.md
Setup ELK Stack logging with Spring Boot
  1. Download Elastic Search and unzip it
  2. Start Elastic search with the following command and go to URL http://localhost:9200
$ bin/elasticsearch
  1. Download LogStash and unzip it
  2. Create logstash-elk.conf file on logstash home directory with the following content and change the log file location and index name based on your settings
input {
 file {
@tineo
tineo / wkhtmltopdf.sh
Created June 21, 2019 06:31 — forked from akhmadkresna/wkhtmltopdf.sh
wkhtmltopdf install on ubuntu 18.04
sudo wget https://builds.wkhtmltopdf.org/0.12.1.3/wkhtmltox_0.12.1.3-1~bionic_amd64.deb
sudo dpkg -i wkhtmltox_0.12.1.3-1~bionic_amd64.deb
sudo apt-get install -f
sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin
sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin
@tineo
tineo / create.sql
Created June 16, 2017 02:04 — forked from 2huBrulee/create.sql
BD_PIZZAIR_V1
-- Created by Vertabelo (http://vertabelo.com)
-- Last modification date: 2017-06-16 01:34:53.584
-- tables
-- Table: Ingrediente
CREATE TABLE Ingrediente (
id_ingrediente int NOT NULL,
nombre varchar(60) NOT NULL,
descripcion text NOT NULL,
tipo int NOT NULL,
@tineo
tineo / LoginAuthenticationHandler.php
Created March 20, 2017 03:52 — forked from chalasr/LoginAuthenticationHandler.php
FOSUserBundle Login Authentication Success Handler example.
<?php
namespace AppBundle\EventListener;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>DataBase</groupId>
<artifactId>database</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
//Clase BacktrackingMochila
import javax.swing.JOptionPane;
//Error El vector Final se modifica en todo momento nose porque, ya que solo deberia modificarse cuando el beneficio es mayor que el anterior
public class BacktrackingMochila{
private int p[];
private int b[];
private int s[];
private int Final[]; //va a guardar la mejor solucion con el mayor beneficio
private int voa; // se le asigna la capacidad maxima de la mochila
@tineo
tineo / DoublyLinkedList.c
Created October 4, 2016 23:06 — forked from mycodeschool/DoublyLinkedList.c
Doubly Linked List implementation in C
/* Doubly Linked List implementation */
#include<stdio.h>
#include<stdlib.h>
struct Node {
int data;
struct Node* next;
struct Node* prev;
};
@tineo
tineo / maya2017install.sh
Created October 2, 2016 03:08 — forked from borgfriend/maya2017install.sh
Maya 2017 Installation on Ubuntu 16.04
#!/bin/bash
#Make sure we’re running with root permissions.
if [ `whoami` != root ]; then
echo Please run this script using sudo
echo Just type “sudo !!
exit
fi
#Check for 64-bit arch
if [uname -m != x86_64]; then
var Proxy = require("http-proxy");
var HTTP = require("http");
var URL = require("url");
var appProxy = Proxy.createProxyServer({
target: {
host: "127.0.0.1",
port: "8080"
}
});