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
return res.status(HTTPStatuses.CREATED).json(resourceId);
} catch {
return res.status(HTTPStatuses.BAD_REQUEST).json(error);
binario200 /
Created Sep 24, 2018
Working with kubernetes

cat ~/.kube/config

binario200 / kube-config.yml
Last active Aug 20, 2018
kubernetes how to
View kube-config.yml
kind: MasterConfiguration
service-node-port-range: 8000-31274
binario200 /
Last active Aug 16, 2018
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:

Jenkins wiki on installing Jenkins in a CentOS environment:

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

cd ~/
wget -O ~/
sudo yum -y install unzip java-1.8.0-openjdk
sudo mkdir /opt/gradle
sudo unzip -d /opt/gradle/ ~/
sudo vi /etc/profile.d/

binario200 /
Last active Apr 30, 2018
Powershell azure CI/CI

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 /
Created Apr 29, 2018 — forked from ZenLulz/
Install Oh-My-Zsh + iTerm2 with Solarized + System-wide console in 2017 (macOS)

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 /
Last active Apr 22, 2018
A set of fixes for some common terraform issues.

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 /
Created Apr 8, 2018
Memoizing with is prime function
function isPrime(value) {
   // creates the cache
   if(!isPrime.answeres) {
      isPrime.answers = {};
   // checks for cached values
   if (isPrime.answers[value] !== undefined) {
binario200 /
Last active Apr 8, 2018
Storing a collection of unique functions
var store = {
  nextId: 1,
  cache: {},
  add: function(fn) {
     if (! { = this.nextId++;
        this.cache[] = fn;
        return true;
You can’t perform that action at this time.