Skip to content

Instantly share code, notes, and snippets.

View themakunga's full-sized avatar
🍍
Hawaiian King

Nicolas Martinez themakunga

🍍
Hawaiian King
View GitHub Profile
@themakunga
themakunga / README.md
Last active December 7, 2021 22:26
Validador de RUN chileno en TypeScript

Validador de RUN chile en Typescript

conmo usarlo

solo rut

import { validateRUN } from 'your/dir/file.ts';

const run: string = '11.111.111-1'; // also can be '11111111-1' or '111111111'
const response: boolean = validateRUN({run});

Limit commit branches

In your git project download the script, change the name, made it executable and you can use it

wget https://gist.githubusercontent.com/themakunga/1ba3d397594d5f3fa298c547c14c82e2/raw/65b4a81eaef5ba30063f6f2954e3c87da11bd84d/prepare-commit-msg.py

mv ./prepare-commit-msg.py ./.git/hooks/prepare-commit-msg
@themakunga
themakunga / ChileanRUTValidator.js
Created July 3, 2019 14:29
Validador de RUT chileno en js ES6
const RutLengthException = (message) => {
this.message = message;
this.type = 'RutLengthException';
};
RutLengthException.prototype.toString = () => `${this.type}: ${this.message}`;
const validadorRut = (rut) => {
let sum = 0;
let mul = 2;
@themakunga
themakunga / package.json
Last active May 26, 2019 21:53
WA en js para los problemas de nuxt con memoria Heap abajo sale como dejarlo en la seccion scripts de package.json
{
"scripts": {
"serve": "node --max-old-space-size=3072 ./workAround.js",
}
}
#!/bin/bash
optdir=/opt/Postman
cd /tmp || exit
echo "Descargando la ultima version ..."
wget https://dl.pstmn.io/download/latest/linux?arch=64 -O postman.tar.gz
tar -xzf postman.tar.gz
rm postman.tar.gz
#!/bin/bash
# @Author: Salvador Maureira B.
# @Date: 09-05-2018 18:58:35
# @Email: smaureira@allware.cl
# @Last modified by: Salvador Maureira B.
# @Last modified time: 11-05-2018 09:35:14
###### Parametros para la configuracion

Presentacion General

Rutas Colombia es la mayot operadora de concesiones de carreteras interurbanas a lo largo del pais, para lo cual cuenta con una amplia y probada experiencia en la promocion, financiamiento, construccion y operacion de concesiones. Cuenta con 5 concesiones a lo largo del pais como:

  • Ruta del Norte 1.
  • Ruta del Norte 2.
  • Ruta Centro.
  • Ruta Sur 1.
  • Ruta Sur 2.
@themakunga
themakunga / magento2__install.sh
Created April 23, 2018 15:11
Instalacion de Magento2.1.12 con sampledata
#!/bin/bash
###### Parametros para la configuracion
ADMIN_FIRSTNAME="Allware" #Nombre del administrador
ADMIN_LASTNAME="Allware" #Apellido del Administrador
ADMIN_MAIL="smaureira@allware.cl" #Correo del Administrador
ADMIN_USER="allware" #Nombre de Usuario del Administrador
ADMIN_PASS="allware123" #Contrasela del Administrador
DB_HOST="localhost" #Ubicacion de la base de datos
DB_USER="webservice" #usuario con permisos para la base de datos
//
// UIBarButtonItem+Badge.swift
// PiGuardMobile
//
// Created by Stefano Vettor on 12/04/16.
// Copyright © 2016 Stefano Vettor. All rights reserved.
//
import UIKit
@themakunga
themakunga / detele_arch.sh
Created March 27, 2018 16:11
this script delete other arch than arm from scripts or frameworks in a swift app, add ir in the build fase of your xcode
APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}"
# This script loops through the frameworks embedded in the application and
# removes unused architectures.
find "$APP_PATH" -name '*.framework' -type d | while read -r FRAMEWORK
do
FRAMEWORK_EXECUTABLE_NAME=$(defaults read "$FRAMEWORK/Info.plist" CFBundleExecutable)
FRAMEWORK_EXECUTABLE_PATH="$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME"
echo "Executable is $FRAMEWORK_EXECUTABLE_PATH"