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.
Block or report user

Report or block degt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@degt
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.resume();
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
degt / spyscroll.js
Created May 24, 2018
Cambia el fondo de la navegación
View spyscroll.js
$(document).ready(function(){
$(window).scroll(function(evt){
var height = $(window).scrollTop();
if(height > 300) {
$('.navbar').addClass('bg-dark');
}else{
$('.navbar').removeClass('bg-dark');
}
});
@degt
degt / UpgradePHPEB.sh
Created Apr 3, 2018
Upgrade PHP version on AWS EB
View UpgradePHPEB.sh
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
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
degt / seed.md
Last active Dec 22, 2017
Running laravel db:seed on Heroku
View seed.md
  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
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/;
if(regex.test(href)){
$(ele).remove();
}
});
@degt
degt / phoneregex.js
Last active Feb 28, 2017
9 digits phone validation
View phoneregex.js
var phoneRegex = /^[0-9]{9}$/;
View Liquid.md

#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”

You can’t perform that action at this time.