Skip to content

Instantly share code, notes, and snippets.

View mmurph211's full-sized avatar

Matt Murphy mmurph211

View GitHub Profile
widget.sendAction("read_article", {
alertStyle : "topFadeIn",
throttleByUrlUniqueness : true, // Prevents earning achievements by reloading the page
callback : function(action, earned, achievement) {
console.log(action + " recorded"); // Outputs read_article recorded
}
});
@mmurph211
mmurph211 / AchievementsController.java
Last active December 27, 2015 19:09
Example animated, custom achievements implementation for SessionM's Android SDK v1.9.5.Check out https://developer.sessionm.com/docs#android_custom_achievement_guide for more information.
import java.util.Timer;
import java.util.TimerTask;
import android.app.Activity;
import android.content.res.Resources;
import android.util.Log;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;
import android.view.animation.Transformation;
@mmurph211
mmurph211 / Storage.js
Created December 12, 2012 21:10
Internet Explorer localStorage polyfill
////////////////////////////////////
//
// Internet Explorer localStorage polyfill
// MIT-style license. Copyright 2012 Matt V. Murphy
//
////////////////////////////////////
(function(window, document) {
"use strict";
var userData, attr, attributes;