Skip to content

Instantly share code, notes, and snippets.

View degt's full-sized avatar
⛱️
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
degt / policy.json
Created July 13, 2016 16:51
List a single s3 bucket on Amazon
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::my-bucket"
},
{
"Effect": "Allow",
@degt
degt / website-policy.json
Created July 13, 2016 16:52
Website amazon s3 policy
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::my-bucket/*"
}
]
@degt
degt / ie9.sh
Created August 8, 2016 14:12
Run Windows + iE9 on Virtual Machine
curl -s https://raw.githubusercontent.com/xdissent/ievms/master/ievms.sh | IEVMS_VERSIONS="9" bash
$http.jsonp('{{ site.url }}/posts.json?callback=JSON_CALLBACK').then(function (res) {
$scope.posts = res.data;
}, function (error) {
console.log(error);
});
@degt
degt / Liquid.md
Last active February 2, 2017 12:11

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

@degt
degt / phoneregex.js
Last active February 28, 2017 12:42
9 digits phone validation
var phoneRegex = /^[0-9]{9}$/;
@degt
degt / remove-css.js
Created May 2, 2017 19:50
Remove Stylesheet with name 'base*'
//Remove Base css
$('link').each(function(index, ele){
var href = $(ele).attr('href');
var regex = /base/;
if(regex.test(href)){
$(ele).remove();
}
});
@degt
degt / seed.md
Last active July 15, 2020 05:04
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
degt / array_in_liquid.html
Created October 13, 2017 15:10
Arrays in Liquid
{% assign words = "Hi, how are you today?" | split: ' ' %}
{% for word in words %}
{{ word }} <br>
{% endfor %}
@degt
degt / remove-log.js
Created April 2, 2018 20:14
Remove console.log
console.log = function() {}