Skip to content

Instantly share code, notes, and snippets.

@vmeli
vmeli / gulpfile.js
Created October 16, 2016 04:48 — forked from Sigmus/gulpfile.js
gulpfile.js with browserify, reactify, watchify and gulp-notify.
var source = require('vinyl-source-stream');
var gulp = require('gulp');
var gutil = require('gulp-util');
var browserify = require('browserify');
var reactify = require('reactify');
var watchify = require('watchify');
var notify = require("gulp-notify");
var scriptsDir = './scripts';
var buildDir = './build';
@vmeli
vmeli / template.blade.php
Created October 17, 2016 00:39
Mailgun template
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
<head>
<meta name="viewport" content="width=device-width" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Alerts e.g. approaching your limit</title>
<style type="text/css">
img {
max-width: 100%;
@vmeli
vmeli / gitignore-drupal
Created November 6, 2016 01:41 — forked from necronet/gitignore-drupal
Archivo gitignore para drupal
#Ignore sass cache
.sass-cache/
#ignore tmp
tmp/
sites/all/default/files/*
#Ignore CSS files from theme (they all autogenerated from sass)
sites/all/themes/ayerdis/css/*
@vmeli
vmeli / gist:0389f078e3c354b9f89183e2a07d7f48
Created November 27, 2016 01:58 — forked from zxcvbnm4709/gist:2656197
include jQuery in Chrome Console
var script = document.createElement("script");
script.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js");
script.addEventListener('load', function() {
var script = document.createElement("script");
document.body.appendChild(script);
}, false);
document.body.appendChild(script);
@vmeli
vmeli / HashTable.js
Created March 5, 2017 07:26 — forked from alexhawkins/HashTable.js
Correct Implementation of a Hash Table in JavaScript
var HashTable = function() {
this._storage = [];
this._count = 0;
this._limit = 8;
}
HashTable.prototype.insert = function(key, value) {
//create an index for our storage location by passing it through our hashing function
var index = this.hashFunc(key, this._limit);
@vmeli
vmeli / Gruntfile.js
Created April 1, 2017 22:26 — forked from kentcdodds/Gruntfile.js
Medium blog post gist
module.exports = function(grunt) {
'use strict';
// Project configuration.
grunt.initConfig({
jade: {
local: {
options: {
data: function() {
return require('./jade/getIndexData')('local');
}
@vmeli
vmeli / soluciones.js
Last active April 2, 2017 00:56
Problemas sobre arrays
/*
1. Dado un número N, devolver un arreglo con los números impares comprendidos entre 1 y N.
Ejemplo: N = 5 -> [ 1 , 3 , 5 ]
*/
//cambiar el unshift por el push por ser más costoso
function OddNumber(n){
var a = [];
for (var i = n; i > 0; i % 2 !== 0){
/*
Problema 11.
*/
function cuentaDigitos(variable) {
var string = variable + "";
return string.length;
}
console.log(cuentaDigitos(3333));
/*Transparent pattern placed over an image, like we see on the bootstrap homepage: http://twitter.github.com/bootstrap/index.html*/
div {
width: 200px;
height: 200px;
display: block;
position: relative;
background: url(images/background-image.png);
}
@vmeli
vmeli / sass-2.css
Last active August 7, 2017 06:07
Generated by SassMeister.com.
/* comentario visible --- No 2*/
p {
background-color: yellow;
}
h1 + p {
text-transform: uppercase;
}
h1 > a {
display: flex;