Skip to content

Instantly share code, notes, and snippets.

View leovca's full-sized avatar

Leonan Oliveira leovca

  • Instituto Federal do Norte de Minas Gerais - IFNMG
  • Brasil
View GitHub Profile

Keybase proof

I hereby claim:

  • I am leovca on github.
  • I am leonan (https://keybase.io/leonan) on keybase.
  • I have a public key whose fingerprint is 35A3 9C04 D363 17BA A0EA CFA9 4BAF C009 AA3E 18B4

To claim this, I am signing this object:

@leovca
leovca / AccountAuthenticator.java
Created May 24, 2016 03:46 — forked from burgalon/AccountAuthenticator.java
Implementing OAuth2 with AccountManager, Retrofit and Dagger
public class AccountAuthenticator extends AbstractAccountAuthenticator {
private final Context context;
@Inject @ClientId String clientId;
@Inject @ClientSecret String clientSecret;
@Inject ApiService apiService;
public AccountAuthenticator(Context context) {
super(context);
// Directive for autoNumeric.js
// Require AngularJS, jQuery and autoNumeric.js
angular.module('crunch.ui.numeric', []).directive('crNumeric', [function () {
'use strict';
// Declare a empty options object
var options = {};
return {
// Require ng-model in the element attribute for watching changes.
require: '?ngModel',
// This directive only works when used in element's attribute (e.g: cr-numeric)