Skip to content

Instantly share code, notes, and snippets.

View edgardo001's full-sized avatar

Edgardo vasquez edgardo001

View GitHub Profile
@edgardo001
edgardo001 / QRAndLogo.java
Created August 8, 2016 19:44 — forked from wombat/QRAndLogo.java
QR-Code with embedded logo
// Create new configuration that specifies the error correction
Map<EncodeHintType, ErrorCorrectionLevel> hints = new HashMap<EncodeHintType, ErrorCorrectionLevel>();
hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H);
QRCodeWriter writer = new QRCodeWriter();
BitMatrix bitMatrix = null;
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try {
// Create a qr code with the url as content and a size of 250x250 px
@edgardo001
edgardo001 / Operaciones-Git
Created September 7, 2016 03:45 — forked from jelcaf/Operaciones-Git
Git Tips - Mini-trucos de Git para facilitarme la tarea
#############################################
# Push de la rama actual
git push origin $rama_actual
#############################################
# Volver a un commit anterior, descartando los cambios
git reset --HARD $SHA1
#############################################
# Ver y descargar Ramas remotas
@edgardo001
edgardo001 / script-bash-import-mysql-postgresql
Created September 22, 2016 14:08 — forked from gabrielkfr/script-bash-import-mysql-postgresql
Script bash que permite importar una base de datos en MySQL o PostgreSQL a partir de una archivo dump.
#!/bin/bash
 
# -- CONFIGURACIÓN DE VARIABLES GLOBALES
APP_HOME="."
APP_OUTPUT="import.log"
 
MYSQL_DBUSER_ADM="root"
MYSQL_DBUSER="admin"
MYSQL_DBPASS="admin"
MYSQL_DBNAME="mi_db"
@edgardo001
edgardo001 / Linux Static IP
Last active November 8, 2016 12:16 — forked from fernandoaleman/Linux Static IP
How To Configure Static IP On CentOS 6
## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static
@edgardo001
edgardo001 / login.html
Created December 22, 2016 16:19
Template HTML, formulario Login alienado a la derecha con bordes redondeados
<!DOCTYPE html>
<html>
<head>
<!--<link rel="stylesheet" type="text/css" href="css/bootstrap.css">-->
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<style>
.panel{
border: 2px solid #DFE0E2;
width: 350px;
padding: 10px 10px 10px 10px;
@edgardo001
edgardo001 / colpaseNavMenu.css
Created January 3, 2017 17:31
Bootstrap Colapsar Nav Menu al llegar a un determinado tamaño
/*--------------------------------------------*/
/*Colapsa el menu al llegar "max-width: 992px"*/
/*--------------------------------------------*/
@media (max-width: 992px) {
.navbar-header {
float: none;
}
.navbar-left,.navbar-right {
float: none !important;
@edgardo001
edgardo001 / CrearCertificadosSelfSignedAlVueloConMicrosoftPowerShell.md
Created March 13, 2017 12:15
Comandos probados para generar certificados autofirmados desde powershell, los certificados pueden tener diferentes usos (ssl, encriptacion, firma electronica, sellado de tiepo, etc).

Crear Certificados SelfSigned al vuelo con Microsoft y PowerShell

https://technet.microsoft.com/es-es/library/hh848633.aspx

  • Client Authentication. 1.3.6.1.5.5.7.3.2
  • Server Authentication. 1.3.6.1.5.5.7.3.1
  • Secure Email. 1.3.6.1.5.5.7.3.4
  • Code Signing. 1.3.6.1.5.5.7.3.3
  • Timestamp Signing. 1.3.6.1.5.5.7.3.8
@edgardo001
edgardo001 / RemoveInterface.md
Last active March 17, 2017 11:39
Removedor de interfaces de red.

RemoveInterface.sh - para remover interfaz de red en CentOS

Esto se puede copiar y pegar en un archivo "removeInterfaze.sh" y ejecutarlo con permisos de ejecucion.

#!/bin/bash
rm /etc/sysconfig/network-scripts/ifcfg-eth0
rm /etc/sysconfig/networking/devices/ifcfg-eth0
rm /etc/sysconfig/networking/profiles/default/ifcfg-eth0
rm /etc/udev/rules.d/70-persistent-net.rules
@edgardo001
edgardo001 / instpubs.sql
Last active March 21, 2017 14:31
Base de datos Testing pubs Sample Database - SQL Server
/* */
/* InstPubs.SQL - Creates the Pubs database */
/* */
/*
** Copyright Microsoft, Inc. 1994 - 2000
** All Rights Reserved.
*/
SET NOCOUNT ON
GO
@edgardo001
edgardo001 / instnwnd.sql
Last active March 21, 2017 14:31
Base de datos Testing Northwind Sample Database - SQL Server
/*
** Copyright Microsoft, Inc. 1994 - 2000
** All Rights Reserved.
*/
SET NOCOUNT ON
GO
USE master
GO