Skip to content

Instantly share code, notes, and snippets.

View binario200's full-sized avatar

Victor Hernandez binario200

View GitHub Profile
@binario200
binario200 / CheckboxWithLabel.js
Last active April 14, 2022 08:48
How to test react components with Jest
import React from 'react';
export default class CheckboxWithLabel extends React.Component {
constructor(props) {
super(props);
this.state = {isChecked: false};
// bind manually because React class components don't auto-bind
// http://facebook.github.io/react/blog/2015/01/27/react-v0.13.0-beta-1.html#autobinding
this.onChange = this.onChange.bind(this);
@binario200
binario200 / React-Getting-Started.md
Last active December 7, 2021 19:31
React Getting Started: Quick reference to start playing well
@binario200
binario200 / myBitcoinReadme.md
Last active July 15, 2020 03:51
bitcoin notes.

My bitcoin notes.

Decentralized digital currency

  • Not central authority to shut down. - not central point of failure
  • no frozen accounts
  • no fees

How it works

concepts:

@binario200
binario200 / az103Network.md
Last active July 15, 2020 02:53
notes for the azure 103 certification content

https://docs.microsoft.com/en-us/learn/certifications/exams/az-103

Plan IP addressing for your networks

Before planning your network IP address scheme, you must gather the requirements for your infrastructure. These requirements also will help you prepare for future growth by reserving extra IP addresses and subnets. Here are two of the questions you might ask to discover the requirements:

  • How many devices do you have on the network?
  • How many devices are you planning to add to the network in the future?
@binario200
binario200 / myBitcoinReadme.md
Created June 30, 2020 23:18
bitcoin notes.

My bitcoin notes.

export async function createResource(req,res) {
try {
// cuando utilizar await y cuando no ?
// processResource puede tomar 2 o 3 minutos por eso creo que no deberia tener await
// para no tener esperando la respuesta del endpoint hasta que termine
processResourceRequest();
return res.status(HTTPStatuses.CREATED).json(resourceId);
} catch {
return res.status(HTTPStatuses.BAD_REQUEST).json(error);
@binario200
binario200 / readme.md
Created September 24, 2018 02:25
Working with kubernetes

cat ~/.kube/config

@binario200
binario200 / kube-config.yml
Last active August 20, 2018 22:27
kubernetes how to
apiVersion: kubeadm.k8s.io/v1alpha1
kind: MasterConfiguration
networking:
podSubnet: 10.244.0.0/16
apiServerExtraArgs:
service-node-port-range: 8000-31274
@binario200
binario200 / jenkins-install-centos.md
Last active August 16, 2018 23:15
Jenkins installation at centos

In order to use Jenkins as part of a CI/CD solution, you must first know how to install it. This lesson will take you through the steps necessary in order to install Jenkins and prepare it for use in a CI process. It provides a demonstration of installing Jenkins on a CentOS environment using yum. After completing this lesson, you should be able to perform a Jenkins installation yourself.

Jenkins installation docs: https://jenkins.io/doc/book/installing/


Jenkins wiki on installing Jenkins in a CentOS environment: https://wiki.jenkins.io/display/JENKINS/Installing+Jenkins+on+Red+Hat+distributions

Here are the commands used to install Jenkins in the demonstration:

@binario200
binario200 / gradle-install.md
Created August 9, 2018 22:27
Install gradle
cd ~/
wget -O ~/gradle-4.7-bin.zip https://services.gradle.org/distributions/gradle-4.7-bin.zip
sudo yum -y install unzip java-1.8.0-openjdk
sudo mkdir /opt/gradle
sudo unzip -d /opt/gradle/ ~/gradle-4.7-bin.zip
sudo vi /etc/profile.d/gradle.sh