Skip to content

Instantly share code, notes, and snippets.

Le vent se lève, il faut tenter de vivre.

Daniel Gutiérrez degt

Le vent se lève, il faut tenter de vivre.
View GitHub Profile
degt / convert.js
Last active Sep 3, 2018
Convert .VUE files to .js
View convert.js
const compiler = require('vue-template-compiler');
const babel = require("@babel/core");
let content = '';
process.stdin.on('data', buf => {
content += buf.toString();
View gist:56e36dfe40383be29ec2268106793166
"build-wc": "vue-cli-service build --target wc --name lib 'src/components/*.vue'"
degt / spyscroll.js
Created May 24, 2018
Cambia el fondo de la navegación
View spyscroll.js
var height = $(window).scrollTop();
if(height > 300) {
degt /
Created Apr 3, 2018
Upgrade PHP version on AWS EB
aws elasticbeanstalk update-environment --solution-stack-name "64bit Amazon Linux 2017.09 v2.6.6 running PHP 7.1" --environment-id "********" --region "us-east-1"
degt / remove-log.js
Created Apr 2, 2018
Remove console.log
View remove-log.js
console.log = function() {}
View array_in_liquid.html
{% assign words = "Hi, how are you today?" | split: ' ' %}
{% for word in words %}
{{ word }} <br>
{% endfor %}
degt /
Last active Jul 15, 2020
Running laravel db:seed on Heroku
  1. run "heroku run bash". This creates a one-off-dyno in your heroku app.
  2. run "composer update". now if you check vendor folder you can see fzaninotto/faker package installed.
  3. now run "php artisan db:seed". Your database will be seeded.
degt / remove-css.js
Created May 2, 2017
Remove Stylesheet with name 'base*'
View remove-css.js
//Remove Base css
$('link').each(function(index, ele){
var href = $(ele).attr('href');
var regex = /base/;
degt / phoneregex.js
Last active Feb 28, 2017
9 digits phone validation
View phoneregex.js
var phoneRegex = /^[0-9]{9}$/;

#Includes en Liquid

En Liquid podemos crear bloques o ‘Snippets’ dinámicos que permitan modificar el contenido, clases o cualquier contenido según sea necesario.

Por ejemplo una alerta:

Snippet “alerta”