Skip to content

Instantly share code, notes, and snippets.

@anareyna
anareyna / forms.styl
Created September 11, 2014 19:28
formularios
/**
* Forms
* @module forms
*/
form
width 100%
margin 30px auto 0
text-align left
font-size 1em
&.vertical
@anareyna
anareyna / rem.styl
Last active August 29, 2015 14:05
RemToPx
$basefont = 14px
rem($list)
$max = length(arguments)
for $i in (0..$max - 1)
$list[$i] = round(( arguments[$i] / $basefont )rem , 3)
return $list
// Example usage:
@anareyna
anareyna / jeet.styl
Created July 24, 2014 17:57
Jeet: a grid system for humans 24-07-2014
// settings.styl
// Grid Settings
jeet = {
gutter: 2,
parent-first: false,
layout-direction: LTR
}
g = jeet.gutter
@anareyna
anareyna / mixins.styl
Created June 17, 2014 22:06
Mixins to convert "em, rem and px" units with stylus
$basefont = 14px
em(size, parentFontSize = 0)
if parentFontSize == 0
font-size round(( size / $basefont )em , 3)
else
font-size round(( size / parentFontSize )em , 3)
rem(size)
font-size ( size )px
font-size round(( size / $basefont )rem , 3)
@anareyna
anareyna / chinito.js
Created May 28, 2014 14:29
Chinito script
var Chinito = (function() {
var st = {
voz: '#voz',
viewVideo: '.video-panel',
meGusta: '#megusta',
compartir: '#compartir',
aviso: '.aviso',
buscaVehiculo: '.busca-vehiculo',
btnRegister: '#btnRegister',
@anareyna
anareyna / parsley_es.js
Last active November 26, 2021 20:50
How to use Parsley validation
// ParsleyConfig definition if not already set
window.ParsleyConfig = window.ParsleyConfig || {};
window.ParsleyConfig.i18n = window.ParsleyConfig.i18n || {};
window.ParsleyConfig.i18n.es = $.extend(window.ParsleyConfig.i18n.es || {}, {
defaultMessage: "Este valor parece ser inválido.",
type: {
email: "Ingrese un email válido.",
url: "Ingrese una URL válida.",
number: "Ingrese un número válido.",
@anareyna
anareyna / gruntfile.js
Last active August 29, 2015 14:01
Gruntfile.js ofertop
module.exports = function(grunt) {
var path = {
jadeflux : "jadeflux/",
styflux : "styl/",
coffee : "coffee/",
public : "../public/",
static : "../public/static/o/"
};
// Configuración para proyectos y tareas
// Jeet 5 - http://jeet.gs
/* Syntax Quick Reference
--------------------------
column(ratios = 1, offset = 0, cycle = 0, uncycle = 0)
span(ratio = 1, offset = 0)
shift(ratios = 0, col_or_span = column)
unshift()
edit()
@anareyna
anareyna / Gruntfile.js
Last active August 29, 2015 13:59
Grunt common tasks
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// clean
clean: {
options: {force: true},
build: {
src: [cfg.js_compiled_source_path]
}
},
{
"name": "NuestroMercado",
"description": "NuestroMercado Automatic Frontend Flow",
"version": "3.1.0",
"devDependencies": {
"grunt-contrib-requirejs": "~0.4.0",
"grunt": "~0.4.2",
"grunt-cli": "0.1.x",
"grunt-exec": "~0.4.0",
"grunt-replace": "~0.6.0",