Skip to content

Instantly share code, notes, and snippets.

@johanmendezb
johanmendezb / gulpfile.js
Created August 18, 2015 20:20
basic_gulp
var gulp = require('gulp'),
sass = require('gulp-sass'),
coffee = require('gulp-coffee'),
jade = require('gulp-jade'),
sourcemaps = require('gulp-sourcemaps'),
minifyHTML = require('gulp-minify-html'),
minifyCss = require('gulp-minify-css'),
concat = require('gulp-concat'),
uglyfly = require('gulp-uglyfly'),
gutil = require('gulp-util'),
class Enemy
attr_accessor :vida, :ataque, :suerte, :level, :exp
def initialize(vida, ataque, suerte)
@vida = vida
@ataque = ataque
@suerte = suerte
@levelpts = 18 #suppose to read player lvl
@exp => @levelpts
end
@johanmendezb
johanmendezb / gulpfile.js
Last active March 5, 2016 12:30
gulpfile.js
//more info here https://github.com/stefanpenner/es6-promise
require('es6-promise').polyfill();
//if a new task is needed please add the variable in this list
var gulp = require('gulp'),
// it synchronizes with the browser on save
browserSync = require('browser-sync').create(),
reload = browserSync.reload,
// plumber handles errors to display them in console
*, *:after, *:before {
box-sizing: border-box;
}
#logo-size {
width: 200px;
margin-left: -100px;
margin-top: -20px;
left: 50%;
position: absolute;
<script type="text/javascript">
(function(e){function t(){var t=window.module.lp.form.data;var n=t.validationMessages;var r=t.validationRules;this.changeTitle=function(n){e(function(){e("#"+t.errorContainerId).find("div.error").text(n)})};this.changeField=function(e,t,i){if(!n[e])return;n[e].required=t;if(i&&r[e].email)n[e].email=i;if(i&&r[e].phone)n[e].phone=i}}window.errors=new t(lp.jQuery)})(lp.jQuery)
// Change the title bar of the validation error box
errors.changeTitle("Por favor soluciona estos problemas:");
// Change the error text for specific fields. The first message is shown when nothing is
// entered and the second is shown when an invalid email/phone number is entered.
errors.changeField("nombre_y_apellido", "¡Ingresa tu nombre!");
errors.changeField("correo_electronico", "¡Ingresa tu correo electrónico!", "¡El correo ingresado no es un correo valido!");
//this script onlo works with jquery1.11.1
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
<script>
// all the fields must be filled with it's respective id
var buttonId = "//field id";
var nameId = "//field id";
var emailId = "//field id";
var phoneId = "//field id";
@johanmendezb
johanmendezb / pubsub.js
Created October 27, 2016 14:31 — forked from learncodeacademy/pubsub.js
Basic Javascript PubSub Pattern
//events - a super-basic Javascript (publish subscribe) pattern
var events = {
events: {},
on: function (eventName, fn) {
this.events[eventName] = this.events[eventName] || [];
this.events[eventName].push(fn);
},
off: function(eventName, fn) {
if (this.events[eventName]) {
<mjml>
<mj-body>
<mj-container>
<mj-section background-color="#ffffff" background-url="http://repoimagenesmesfix8182.cloudapp.net/images/mailing/campaign/Untitled-2-min.png" padding-bottom="161" padding-top="0">
</mj-section>
<mj-section background-color="#ffffff" padding-bottom="20" padding-top="20">
<mj-column width="100%" vertical-align="top">
<mj-text align="center" font-family="Roboto, sans-serif" padding-bottom="0">
<p><span style="color:#05517F;"><span style="font-weight: bold;"><span style="font-size: 20px;">TENEMOS NUEVAS SUBASTAS</span></span>
</span>
<mjml>
<mj-body>
<mj-container>
<mj-section background-color="#ffffff" background-url="http://repoimagenesmesfix8182.cloudapp.net/images/mailing/campaign/Untitled-2-min.png" padding-bottom="161" padding-top="0">
</mj-section>
<mj-section background-color="#ffffff" padding-bottom="20" padding-top="20">
<mj-column width="100%" vertical-align="top">
<mj-text align="center" font-family="Roboto, sans-serif" padding-bottom="0">
<p><span style="color:#05517F;"><span style="font-weight: bold;"><span style="font-size: 20px;">REMATES DISPONIBLES</span></span>
</span>
<mjml>
<mj-body>
<mj-container background-color="#ffffff" font-size="13px">
<mj-section background-color="#ffffff" hidden="false" name="Nouvelle section" padding-bottom="0" padding-top="20">
<mj-column vertical-align="top" width="100%">
<mj-text align="center" color="#000000" font-size="13px" word-wrap="break-word" font-family="Open Sans" vertical-align="top" container-background-color="#ffffff" padding-left="10" padding-right="10" padding-bottom="0" padding-top="0">
<h2 style="font-size: 19px; font-weight: 700; line-height: 30px;"><span style="font-size:14.666666666666666px;font-family:'Open Sans';color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;"><span style="font-size:14.666666666666666px;font-family:'Open Sans';color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;