Skip to content

Instantly share code, notes, and snippets.

View alejandroiglesias's full-sized avatar

Alejandro García Iglesias alejandroiglesias

View GitHub Profile
(function( window ) {
'use strict';
_.templateSettings = {
interpolate: /\{\{(.+?)\}\}/g,
escape: /\{\{\{(.+?)\}\}\}/g
};
/*****************************
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>MediaKit 2012</title>
<meta name="description" content="">
eval(unescape('javascript:var%20s%3Ddocument.createElement(%27script%27)%3Bs.setAttribute(%27src%27,%27http://emuspin.com/js/bookmarklet.js%27)%3Bs.setAttribute(%27type%27,%27text/javascript%27)%3Bdocument.body.appendChild(s)%3Bvoid(0)%3B'))
// Preview button
$(document).on('click', '#btn-preview', function (event) {
$.when(App._doFormAutosave()).done(function() {
// here I want the event to not be prevented
});
event.preventDefault();
});
@alejandroiglesias
alejandroiglesias / Gruntfile
Created November 20, 2012 21:11
Gruntfile
/*global module:false*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
meta: {
version: '1.0.0',
banner: '/*! GRUPO EXPANSION MEDIAKIT - v<%= meta.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %> */\n' //+
// '* http://PROJECT_WEBSITE/\n' +
@alejandroiglesias
alejandroiglesias / backfill.js
Created November 22, 2012 20:19
Parrot Backfill
/*
* Parrot Backfill script.
*/
'use strict';
var config = require('./config.json');
var db = require('mysql').createConnection(config.db);
var twitter = require('tuiter')(config.twitter_api_keys);
var View = Base.extend({
initialize: function () {
console.log('view init');
if ( ! this.el) {
this.el = this.el || document.createElement(this.tagName);
}
}
});
var FilterListView = View.extend({
if (dismissAll) {
$alert = $('#alertList .alert');
alertId = $alert.get().map(function (el) {
return $(el).data('id');
});
App.alertsCount = 0;
}
else {
$alert = $(event.target).closest('.alert');
alertId = [$alert.data('id')];
require.config({
paths: {
jquery: '../components/jquery/jquery',
purl: '../components/jQuery-URL-Parser/purl'
}
});
require(['purl', 'app'], function (purl, App) {
'use strict';
var Slider = function (options) {
var defaults = {
horizontal: false,
vertical: true,
y: 0.5,
animationCallback: function (x, y) {
var frame = Math.ceil(y * 35);
this.wrapper.parentNode.className = 'snicker-blue ' + 'snicker-tiptop-' + frame;
}
};