Skip to content

Instantly share code, notes, and snippets.

View rafaelrinaldi's full-sized avatar

Rafael Rinaldi rafaelrinaldi

View GitHub Profile
var open = require('open'),
gulp = require('gulp'),
connect = require('gulp-connect'),
rjs = require('requirejs').optimize,
preprocess = require('gulp-preprocess'),
autoprefixer = require('gulp-autoprefixer'),
sass = require('gulp-sass'),
env = process.env.NODE_ENV || 'development',
paths = {
output: './public',
@rafaelrinaldi
rafaelrinaldi / onboarding.js
Created April 28, 2014 23:36
onboarding.js
//= require modules/onboarding/onboarding_single_choice
//= require modules/onboarding/onboarding_multiple_choice
Module('OnboardingController.Index', function(Index) {
/**
* 1. Grab survey model remotely
* 2. Register dynamic components
* 3. Bootstrap Vue app
*/
@rafaelrinaldi
rafaelrinaldi / vue.js
Created May 8, 2014 23:50
Vue new dev release
/*
Vue.js v0.10.4
(c) 2014 Evan You
License: MIT
*/
;(function(){
'use strict';
/**
* Require the given path.
@rafaelrinaldi
rafaelrinaldi / vue.js
Created May 12, 2014 13:36
Own Vue release
/*
Vue.js v0.10.4
(c) 2014 Evan You
License: MIT
*/
;(function(){
'use strict';
/**
* Require the given path.
<img src="http://gallery.mailchimp.com/b72a603ed249f5967afc29aa4/images/1e7e7ad6-c327-4875-a0d3-150524a0d5dd.png" style="display: block; margin: 0 auto;" />
<div>&nbsp;</div>
<div class="content" style="width: 550px; overflow: hidden;">
*|RSSITEMS:|*
<h2 class="mc-toc-title"><a href="*|RSSITEM:URL|*" target="_blank">*|RSSITEM:TITLE|* </a></h2>
<em>Por *|RSSITEM:AUTHOR|* em *|RSSITEM:DATE:d/m/y|*</em><br />
*|RSSITEM:CONTENT|*<br />
<a href="*|RSSITEM:URL|*" target="_blank">Visitar a p&aacute;gina &raquo;</a><br />
<br />
*|END:RSSITEMS|*
define([
'signals',
'hogan',
'mout/lang/isString',
'mout/object/forOwn'
], function(
Signal,
Hogan,
isString,
@rafaelrinaldi
rafaelrinaldi / pinboard.js
Created July 29, 2014 22:03
Pinboard bookmarklet that displays the popup centered
javascript:w=750,h=700,t=(screen.height*.5)-(w*.5),l=(screen.width*.5)-(h*.5),q=location.href,p=document.title;document.getSelection?d=document.getSelection():d='';void(open('https://pinboard.in/add?showtags=yes&url='+encodeURIComponent(q)+'&description='+encodeURIComponent(d)+'&title='+encodeURIComponent(p),'Pinboard','toolbar=no,scrollbars=yes,width='+w+',height='+h+',top='+t+',left='+l));
gulp.task('js', function() {
gulp.src('./js/main.js')
.pipe(uglify())
.pipe(wrap('(function(){<%= contents %>})()'))
.pipe(concat('main.min.js'))
.pipe(gulp.dest('./js/'));
});
var arr = ['foo', 'bar'];
function has(value) {
return arr.indexOf(value) >= 0;
}
has('foo'); // true
has('bar'); // true
has('baz'); // false
MALACO_PORT=9000
VERSION=v.0.2.3 (beta)
LICENSE=MIT license
help:
@sh help.sh
@echo "Malaco $(VERSION) released under $(LICENSE)."
@echo ""
status: