Skip to content

Instantly share code, notes, and snippets.

View renzocastro's full-sized avatar

Renzo Castro Jurado renzocastro

View GitHub Profile
@renzocastro
renzocastro / gruntfile.coffee
Last active August 29, 2015 14:07
Gruntfile only for development with basic tasks: Coffeescript for JS, Stylus for CSS, Copy and String Replace for Views and files server.
gruntFunction = (grunt)->
if grunt.option('dev')
env = 'development'
else if grunt.option('deploy')
env = 'deployment'
else if grunt.option('prod')
env = 'production'
else
env = grunt.option('env') || 'development'
Handlebars.getTemplate = function(name) {
if (Handlebars.templates === undefined || Handlebars.templates[name] === undefined) {
$.ajax({
url : 'templatesfolder/' + name + '.handlebars',
success : function(data) {
if (Handlebars.templates === undefined) {
Handlebars.templates = {};
}
Handlebars.templates[name] = Handlebars.compile(data);
},
/* sans-serif */
font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
font-family: Verdana, Geneva, Tahoma, sans-serif;
font-family: Trebuchet, Tahoma, Arial, sans-serif;
font-family: GillSans, Calibri, Trebuchet, sans-serif;
font-family: "DejaVu Sans", "Bitstream Vera Sans", "Segoe UI", "Lucida Grande", Verdana, Tahoma, Arial, sans-serif;
font-family: Geneva, "Lucida Sans", "Lucida Grande", "Lucida Sans Unicode", Verdana, sans-serif;
font-family: Geneva, Verdana, "Lucida Sans", "Lucida Grande", "Lucida Sans Unicode", sans-serif;
font-family: "HelveticaNeue-Roman", "Helvetica 55 Roman", Helvetica, Arial, sans-serif;
@renzocastro
renzocastro / examen-js-recuperacion.txt
Last active December 17, 2015 16:39
Examen Final de Javascript (Recuperación)
Examen Final (Recuperación)
Fecha: 2013-05-23
Hacer una página HTML que contenga 2 botones.
1. Crear un popup. Seguir la siguiente estructura para sus funciones "show" y "hide".
var popup = {
show: function(url){
console.log('Mostrar popup', url);
@renzocastro
renzocastro / examen2.txt
Last active December 17, 2015 10:39
Javascript: Examen
1.
Teniendo:
var default = {
height: 100,
width: 100,
opacity: 1
}
var options = {
width: 300,
@renzocastro
renzocastro / slider.js
Created May 15, 2013 02:10
jQuery Slider (example)
;(function($, undefined){
"use strict";
var anchoImagen = 400;
var totalImagenes = 5;
var imagenActual = 1;
$(document).one('ready', function(){
console.log('Ready!');
@renzocastro
renzocastro / form1.html
Created May 1, 2013 00:42
formulario html
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Formularios usando jQuery</title>
<link rel="stylesheet" href="css/styles.css">
</head>
<body>
<div id="wrapper">
@renzocastro
renzocastro / tpl.js
Created April 28, 2013 08:32
ICanHaz minimized: tpl
// ==============================
// ICanHaz.js minimizado!
// http://icanhazjs.com/
// @otakurzo - Renzo Castro
// ==============================
var tpl = {
config: {
type: 'text/template'
},
init: function(config){
@renzocastro
renzocastro / main.js
Created April 26, 2013 01:42
JavaScript: Modulo 2 » Clase 2: jQuery I
// ;()();
;(function($){
$(document).ready( function(){
console.log('READY!');
$( '#popup1' ).css({
display: 'none'
});
.popup {
background-color: #fff;
width: 400px;
height: 300px;
position: absolute;
top: 50%;
left: 50%;
z-index: 99999;
}