Skip to content

Instantly share code, notes, and snippets.

loko binario200

Block or report user

Report or block binario200

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:8655825a7db821414a9e52a4a7c4d899
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 Sep 24, 2018
Working with kubernetes
View readme.md

cat ~/.kube/config

@binario200
binario200 / kube-config.yml
Last active Aug 20, 2018
kubernetes how to
View kube-config.yml
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 Aug 16, 2018
Jenkins installation at centos
View jenkins-install-centos.md

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:

View gradle-install.md
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


@binario200
binario200 / PowerShellAzureCI-CD.md
Last active Apr 30, 2018
Powershell azure CI/CI
View PowerShellAzureCI-CD.md

brew tap caskroom/cask Now, you can install PowerShell:

brew cask install powershell Finally, verify that your install is working properly:

pwsh When new versions of PowerShell are released, simply update Homebrew's formulae and upgrade PowerShell:

brew update

@binario200
binario200 / README.md
Created Apr 29, 2018 — forked from ZenLulz/README.md
Install Oh-My-Zsh + iTerm2 with Solarized + System-wide console in 2017 (macOS)
View README.md

Install iTerm2 with Solarized in 2017

Here is the looks and feel of your terminal once the tutorial has been applied on your system:

Install iTerm2

Using Homebrew:

@binario200
binario200 / Terraform-fixes.md
Last active Apr 22, 2018
A set of fixes for some common terraform issues.
View Terraform-fixes.md

Terraform state using a remote storage

In order to have the state of you terraform in a remote place let say at AWS S3 you need to :

  • You need to create the bucket at AWS S3 using terraform
  • you need to add backend to indicate that you will use the bucket created to store the terraform state (encryting it)

provider "aws" {
@binario200
binario200 / memoizing.md
Created Apr 8, 2018
Memoizing with is prime function
View memoizing.md
function isPrime(value) {
   // creates the cache
   if(!isPrime.answeres) {
      isPrime.answers = {};
   }
   
   // checks for cached values
   if (isPrime.answers[value] !== undefined) {
@binario200
binario200 / UniqueFuncsCollections.md
Last active Apr 8, 2018
Storing a collection of unique functions
View UniqueFuncsCollections.md
var store = {
  nextId: 1,
  cache: {},
  add: function(fn) {
     if (!fn.id) {
        fn.id = this.nextId++;
        this.cache[fn.id] = fn;
        return true;
     }
You can’t perform that action at this time.