Skip to content

Instantly share code, notes, and snippets.

Jorge Epuñan juanbrujo

Block or report user

Report or block juanbrujo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
juanbrujo / fullCalendarDisablePrevNext.js
Last active Jan 26, 2020
jQuery FullCalendar.js: disable prev/next button for past/future dates
View fullCalendarDisablePrevNext.js
viewRender: function(currentView){
var minDate = moment(),
maxDate = moment().add(2,'weeks');
// Past
if (minDate >= currentView.start && minDate <= currentView.end) {
$(".fc-prev-button").prop('disabled', true);
else {
juanbrujo / comunas-regiones.json
Last active Jan 26, 2020 — forked from sergiohidalgo/comunas-regiones-chile.json
Comunas y regiones de chile JSON
View comunas-regiones.json
"regiones": [{
"region": "Arica y Parinacota",
"comunas": ["Arica", "Camarones", "Putre", "General Lagos"]
"region": "Tarapacá",
"comunas": ["Iquique", "Alto Hospicio", "Pozo Almonte", "Camiña", "Colchane", "Huara", "Pica"]
juanbrujo / sharebuttons.html
Last active Jan 21, 2020
lightweight share buttons with vanilla javascript
View sharebuttons.html
<a href="<?php the_permalink(); ?>" class="share facebook">Facebook</a>
<a href="<?php the_permalink(); ?>&text=<?php the_title(); ?>&via=twitter" class="share twitter">Twitter</a>
<a href="<?php the_permalink(); ?>" class="share google">Google+</a>
<a href="<?php the_permalink(); ?>&<?php the_title(); ?>" class="share linkedin">LinkedIn</a>
juanbrujo / getLastRSSFeed.html
Last active Nov 11, 2019
Get and display last feed from RSS using JavaScript (jQuery)
View getLastRSSFeed.html
<div class="noticia">CARGANDO</div>
<script src=""></script>
var url = '';
var news = $('.noticia');
juanbrujo / multipleEventsListeners.js
Last active Nov 5, 2019
Add the capability to attach multiple events to an element, just like jQuery does
View multipleEventsListeners.js
* multipleEventsListeners.js
* Add the capability to attach multiple events to an element, just like jQuery does
function multipleEventsListeners(elem, events, func) {
var event = events.split(' ');
for (var i = 0; i < event.length; i++) {
elem.addEventListener(event[i], func, false);
juanbrujo / less-mediaqueries-mixin.less
Last active Oct 19, 2019
LESS mediaqueries mixin
View less-mediaqueries-mixin.less
// Declare your mediaqueries breakpoints
@mobile: ~"only screen and (max-width: 529px)";
@tablet: ~"only screen and (min-width: 530px) and (max-width: 949px)";
@desktop: ~"only screen and (min-width: 950px) and (max-width: 1128px)";
@desktop-xl: ~"only screen and (min-width: 1129px)";
// Use them easily in your CSS declaration:
element {
property: value;
juanbrujo / Mati.vue
Created Oct 15, 2019
How to use Mati ( Web SDK in a VueJS project
View Mati.vue
<div v-html="MatiButton('CLIENTID')"></div>
juanbrujo / npm-starter.js
Last active Oct 15, 2019
Starter for a basic NPM module
View npm-starter.js
// moduleName = name of your npm module
var moduleName = (function moduleName() {
"use strict";
// return whatever;
})( this );
View CheckEmptyObject.js
const obj = {}
Object.keys(obj).length === 0 && obj.constructor === Object
juanbrujo / checkEmail.vue
Created Aug 29, 2019
Regex to check if email is valid for a Vue.js method.
View checkEmail.vue
checkEmail: function (email) {
// eslint-disable-next-line
const reg = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
if (reg.test(email)) return false
return true
You can’t perform that action at this time.