Skip to content

Instantly share code, notes, and snippets.

View gzumaglini's full-sized avatar

Gianluca Zumaglini gzumaglini

View GitHub Profile
@gzumaglini
gzumaglini / App.js
Created August 14, 2020 08:36
redux-persist-sensitive-storage: Migrate async to sensitive
import createSensitiveStorage from 'redux-persist-sensitive-storage';
import AsyncStorage from '@react-native-community/async-storage';
class App extends React.Component {
/**
* Migrate from async storage to sensitive storage.
*
* @param {*} sensitiveStorage
*/
@gzumaglini
gzumaglini / gist:3cfee13744e8efae7a3c
Created February 3, 2015 20:14
OAuth with Ionic and ngCordova - Trakt.tv API
/*
* Sign into the Trakt service
*
* @param string clientId
* @param string clientSecret
* @return promise
*/
trakt: function(clientId, clientSecret) {
var deferred = $q.defer();
if(window.cordova) {
@gzumaglini
gzumaglini / 0_reuse_code.js
Created May 20, 2014 15:02
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console