For educational reasons I've decided to create my own CA. Here is what I learned.
Lets get some context first.
| // 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 |
| ############################################# | |
| # 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 |
| #!/bin/bash | |
| # -- DEFINICIÓN VARIABLES DE FECHA Y HORA. | |
| DIA=`date +"%Y%m%d"` | |
| HORA=`date +"%H%M"` | |
| # -- CONFIGURACIÓN DE VARIABLES GLOBALES | |
| DUMP_HOME="." | |
| DUMP_FILE="dump_"$DIA"_"$HORA".sql" | |
| #!/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" |
| ## 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 |
| /* Estructura y Datos de las Regiones, Provincias */ | |
| /* y Comunas de Chile. */ | |
| /* */ | |
| /* Fecha: Julio 2010 */ | |
| /* Autor: Juan Pablo Aqueveque - juque.cl */ | |
| -- | |
| -- Comunas | |
| -- | |
| DROP TABLE IF EXISTS `comunas`; |
| var mongoose = require('mongoose'); | |
| mongoose.connect('mongodb://localhost/db_name'); | |
| // map function | |
| var map = function(){ | |
| emit(this.field_to_group_by, { | |
| other_fields: this.other_fields | |
| // list other fields like above to select them | |
| }) | |
| } |
| import javax.crypto.Cipher; | |
| import java.nio.ByteBuffer; | |
| import java.security.GeneralSecurityException; | |
| import java.security.KeyFactory; | |
| import java.security.KeyPair; | |
| import java.security.KeyPairGenerator; | |
| import java.security.NoSuchAlgorithmException; | |
| import java.security.PrivateKey; | |
| import java.security.PublicKey; | |
| import java.security.SecureRandom; |
| #!/usr/bin/env python | |
| import base64 | |
| from Crypto import Random | |
| from Crypto.Cipher import AES | |
| BS = 16 | |
| pad = lambda s: s + (BS - len(s) % BS) * chr(BS - len(s) % BS) | |
| unpad = lambda s : s[0:-ord(s[-1])] |