Skip to content

Instantly share code, notes, and snippets.

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

Jorge Rodriguez Flores jorgedison

🏠
Working from home
View GitHub Profile
swagger: '2.0'
info:
version: 0.7.0
title: Fabric CA Server API
description: Hyperledger Fabric CA Server APIs provides certificate authority services for the blockchain.
schemes:
- https
- http
consumes:
$(Get-Item .\file.txt).creationtime=$(Get-Date "mm/dd/yyyy hh:mm am/pm")
$(Get-Item .\file.txt).lastwritetime=$(Get-Date "mm/dd/yyyy hh:mm am/pm")
  1. Instalacion nginx
sudo apt install nginx
sudo systemctl stop nginx.service
sudo systemctl start nginx.service
sudo systemctl enable nginx.service
sudo systemctl status nginx.service
  1. Instalación PHP, composer y PostgreSQL (Ya esta realizado)
Description: Esta plantilla despliega un VPC, con dos subredes publicas,privadas
y de base de datos repartidas a traves de dos zonas de disponibilidad.
Despliega un internet gateway en las subredes publicas. Despliega NAT gateways
(una en cada AZ), y las rutas por defecto para ellos en las subredes privadas.
Parameters:
EnvironmentName:
Description: Nombre de entorno que se antepone a los nombres de los recursos
Type: String
AllowedValues:

Paso 1: Instalar LetsEncrypt

sudo apt-get install software-properties-common python-software-properties
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install letsencrypt

Paso 2: Configurar el certificado SSL

server {

Paso 1: Instalar Certbot

sudo add-apt-repository ppa:certbot/certbot
sudo apt install python-certbot-apache

Paso 2: Configurar el certificado SSL

sudo vim /etc/apache2/sites-available/your_domain.conf
Busque la línea de ServerName. Debería tener el siguiente aspecto:
/etc/apache2/sites-available/tu_dominio.conf
@jorgedison
jorgedison / SimpleStorage.sol
Created February 21, 2020 19:49
Ethereum Smart Contract Basic
pragma solidity >=0.4.0 <0.7.0;
contract SimpleStorage {
uint storedData;
function set(uint x) public {
storedData = x;
}
function get() public view returns (uint) {
docker exec -it cli bash

export CHANNEL_NAME=marketplace


peer channel create -o orderer.dominio.com:7050 -c $CHANNEL_NAME -f ./channel-artifacts/channel.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/dominio.com/orderers/orderer.dominio.com/msp/tlscacerts/tlsca.dominio.com-cert.pem

peer channel join -b marketplace.block
du -a [path] | sort -n -r | head -n x
@jorgedison
jorgedison / gitlab.rb
Created January 20, 2020 16:41
Configuración Gitlab LDAP
### LDAP Settings
###! Docs: https://docs.gitlab.com/omnibus/settings/ldap.html
###! **Be careful not to break the indentation in the ldap_servers block. It is
###! in yaml format and the spaces must be retained. Using tabs will not work.**
gitlab_rails['ldap_enabled'] = true
gitlab_rails['prevent_ldap_sign_in'] = false
gitlab_rails['ldap_servers'] = YAML.load <<-'EOS'
main: # 'main' is the GitLab 'provider ID' of this LDAP server