Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Marcio Gasparotto marcio

🏠
Working from home
  • Ezy Collect
  • Sydney, Australia
Block or report user

Report or block marcio

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
@marcio
marcio / api.js
Created Sep 25, 2019 — forked from alfonmga/api.js
JWT authentication handler using Axios interceptors. It refreshes access token on the fly when backend API throws out a 401 error. Multiple requests at the same time supported.
View api.js
import axios from 'axios';
import JWTDecode from 'jwt-decode';
import { AuthApi } from './auth.api';
import { config } from '../config';
const { API_ENDPOINT } = config[process.env.NODE_ENV];
axios.defaults.baseURL = API_ENDPOINT;
axios.defaults.timeout = 7000;
View routes
const routes = [
{
path: AppLinks.home.index,
exact: true,
component: Home,
},
{
path: AppLinks.datasets.index,
exact: true,
component: Datasets,
View example.js
//----------------------------------------------------------------------------------------
//FORM COMPONENT
//----------------------------------------------------------------------------------------
/*Callback function, call Store to update */
const updateAttr = e => props.store.updateAttr(e.target.name, e.target.value);
/*Render */
<input
type="text"
@marcio
marcio / SassMeister-input-HTML.html
Created Sep 6, 2015
Generated by SassMeister.com.
View SassMeister-input-HTML.html
<header>Header</header>
<nav>Navigation</nav>
<article>article</article>
<footer>footer</footer>
@marcio
marcio / SassMeister-input-HTML.html
Created Apr 29, 2015
Generated by SassMeister.com.
View SassMeister-input-HTML.html
<header>Header</header>
<nav>Navigation</nav>
<article>article</article>
<footer>footer</footer>
@marcio
marcio / grails_git_bash.sh
Created Apr 11, 2014
My bashrc for grails.
View grails_git_bash.sh
__mgasparotto () {
history -a
history -c
history -r
local BLUE="\[\033[0;34m\]"
local NO_COLOR="\[\e[0m\]"
local GRAY="\[\033[1;30m\]"
local GREEN="\[\033[0;32m\]"
local LIGHT_GRAY="\[\033[0;37m\]"
@marcio
marcio / Gruntfile.js
Created Feb 16, 2014 — forked from booleanbetrayal/Gruntfile.js
Example of Gruntfile
View Gruntfile.js
'use strict';
module.exports = function(grunt) {
// load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
// configurable paths
var paths = {
View new_gist_file_0
$ git config --global push.default current
$ git config --global pull.default current
@marcio
marcio / will_paginate.rb
Created Jun 18, 2013
Wrapper for will_paginate and twitter bootstrap.
View will_paginate.rb
module WillPaginate
module ActionView
def will_paginate(collection = nil, options = {})
options[:renderer] ||= BootstrapLinkRenderer
super.try :html_safe
end
class BootstrapLinkRenderer < LinkRenderer
protected
View gist:2407380
sudo apt-get install build-essential libreadline5 libyaml-ruby libyaml-dev libreadline5-dev ncurses-dev libdbm-ruby libgdbm-ruby libgdbm-dev openssl libopenssl-ruby libffi-dev libffi-ruby libssl-dev libzip-dev libcurl4-openssl-dev
./configure --prefix=/usr/local/ruby/ --without-X11 --with-out-ext=win32ole
You can’t perform that action at this time.