Skip to content

Instantly share code, notes, and snippets.

View alvaro-canepa's full-sized avatar

Alvaro Cánepa alvaro-canepa

View GitHub Profile
@alvaro-canepa
alvaro-canepa / deploy.js
Last active July 31, 2022 10:02
Deploy a versioned vue project throw ssh (using linux)
const chalk = require("chalk");
const { exec } = require("child_process");
const { version } = require("../package.json");
const sSourcePath = `./dist/${version}`;
const sDestPath = `./dist`;
const sFile = `${version}.zip`;
const sServer = "root@gestionweb.uy";
const sServerDest =
"/var/www/devel.gestionweb.uy/plugins/planetadeleste/gw/assets/app/";
@alvaro-canepa
alvaro-canepa / Measure.php
Last active September 24, 2021 10:22
PHP Calculate execution time on code
<?php
class Measure
{
/** @var array */
protected static $timers;
/**
* Sets initial timer for specified name (optional)
*
@alvaro-canepa
alvaro-canepa / phpstorm-octobercms-plugin-update.class.php.vm
Created June 15, 2019 08:19
PHP OctoberCMS Plugin Update for PHPStorm file templates
<?php
#if (${NAMESPACE}) namespace ${NAMESPACE};
#end
use Schema;
use October\Rain\Database\Schema\Blueprint;
use October\Rain\Database\Updates\Migration;
#parse("PHP Class Doc Comment.php")
@alvaro-canepa
alvaro-canepa / phpstorm-octobercms-plugin-schema-create.class.php.vm
Last active June 15, 2019 08:17
PHP OctoberCMS Plugin Schema Create for PHPStorm file templates
<?php
#if (${NAMESPACE}) namespace ${NAMESPACE};
#end
use Schema;
use October\Rain\Database\Schema\Blueprint;
use October\Rain\Database\Updates\Migration;
#parse("PHP Class Doc Comment.php")
@alvaro-canepa
alvaro-canepa / phpstorm-octobercms-plugin-seeder.class.php.vm
Created June 15, 2019 08:13
PHP OctoberCMS plugin seeder for PHPStorm file template
<?php
#if (${NAMESPACE}) namespace ${NAMESPACE};
#end
use October\Rain\Database\Updates\Seeder;
use Symfony\Component\Console\Helper\ProgressBar;
/**
* Class ${NAME}
*
#gmap {
width: 100%;
height: 700px;
border: 1px solid #dedede;
background-color: #f2f2f2;
}