Skip to content

Instantly share code, notes, and snippets.

View cvega93's full-sized avatar
🎯
Growth hacker

Cristian Vega cvega93

🎯
Growth hacker
  • Talently
  • Lima
View GitHub Profile
@cvega93
cvega93 / stars.vue
Created March 26, 2019 17:40
Stars component for Vue.js
<template>
<span>
<slot name="ratio"></slot>
<i class="fa fa-star" aria-hidden="true" v-for="(i, index) in completeStarts()" :key="index"></i>
<i class="fa fa-star-half-o" aria-hidden="true" v-if="haveHalfStart()"></i>
<i class="fa fa-star-o" aria-hidden="true" v-for="(x, index) in incompleteStarts()" :key="index + 5"></i>
<slot></slot>
</span>
</template>
@cvega93
cvega93 / deploy_git.sh
Last active May 28, 2020 16:22 — forked from raco/deploy_git.sh
Easy automatic deploy bash for dummies
#!/bin/sh
projectname=$1;
#Para usar ejecutar sh deploy_git.sh [Nombre proyecto] [Scripts a ejecutar luego de deploy]
cd /var/www;
mkdir $projectname;
cd /var;
mkdir repo;
cd repo;
@cvega93
cvega93 / sitemapGenerator.js
Created October 12, 2019 22:52
Links generator for @nuxtjs/sitemap
env_file = process.env.NODE_ENV ? process.env.NODE_ENV: 'local';
const env = require('./enviroments/'+env_file);
const axios = require('axios');
var routes;
let generatePlaces = async function () {
// Rutas a generar
Conectar Mysql a Datastudio con MySql remote connection
#Modificar la configuración de Mysql para escuchar cualquier IP
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf
#Busca:
bind-address = 127.0.0.1
#Cambialo por
@cvega93
cvega93 / messagebirdWhatsapp.php
Last active February 11, 2021 16:49
Send Whatsapp with Messagebird & ActiveCampaign Example - PHP
<?php
namespace App\Http\Services\User;
//Service Base
use App\Http\Services\ServiceBase;
use Illuminate\Support\Facades\Log;
/**
* Handles complex login and uses the model repo to connect to the db