Skip to content

Instantly share code, notes, and snippets.

View blanks88's full-sized avatar

José Manuel Martínez Blancas blanks88

View GitHub Profile
@blanks88
blanks88 / objectToqueryString.md
Created July 7, 2023 15:58
Typescript: Function to convert any object into querystring
  protected ToQueryString(q: any): string {
    const params = new URLSearchParams(q);
    const keysForDel: any[] = [];

    params.forEach((value, key) => {
      if (value == '') {
        keysForDel.push(key);
 }
@blanks88
blanks88 / kubernetes-cheat-sheet.md
Last active January 12, 2022 16:54
Kubernetes cheat sheet

Login in Docker registry

  1. Create secret
kubectl create secret docker-registry dockerLogin --docker-server=https://index.docker.io/v2/ --docker-username=USER_NAME --docker-password=USER_PSW --docker-email=USER_EMAIL
  1. Implement on deployment
  template:
  ...
 spec:
const express = require('express');
const path = require('path');
const app = express();
// Run the app by serving the static files
// in the dist directory
app.use(express.static(__dirname + '/dist'));
// Start the app by listening on the default
// Heroku port
app.listen(process.env.PORT || 8080);
// For all GET requests, send back index.html
@blanks88
blanks88 / macbook-initializer.md
Last active October 27, 2018 20:51
Macbook initializer