Skip to content

Instantly share code, notes, and snippets.

🤔
Solving problems

Philip Giuliani philipgiuliani

View GitHub Profile
@philipgiuliani
philipgiuliani / gist:7ed2bd4d5993784c9808738df7265323
Created Nov 30, 2016 — forked from jansanchez/gist:ce5b0ca1c5e538f4b266
How to install NVIDIA video drivers in Elementary OS
View gist:7ed2bd4d5993784c9808738df7265323
@philipgiuliani
philipgiuliani / RatingBarVectorFix.java
Last active May 19, 2016 — forked from harrane/RatingBarVectorFix.java
A temp fix for using vector drawable with RatingBar Raw
View RatingBarVectorFix.java
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapShader;
import android.graphics.Canvas;
import android.graphics.PorterDuff;
import android.graphics.Shader;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.ClipDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.LayerDrawable;
@philipgiuliani
philipgiuliani / Cache.js
Created Jul 28, 2015
Cache helper which uses the localStorage. Promise polyfill maybe required!
View Cache.js
window.Cache = {
/**
* Fetch a object from the cache, if it does not exist, create it.
*
* @param {string} key Key to find / store the item in the localStorage.
* @param {function} [fetchPromise] Promise to fetch new data
*
* @example
* Cache.fetch("result", (resolve, reject) => {
* resolve(5 * 10);
@philipgiuliani
philipgiuliani / gist:b63b22309d04048f0827
Created Nov 13, 2014
Receipt with latest_receipt_info as a array
View gist:b63b22309d04048f0827
{ "environment" : "Sandbox",
"latest_receipt" : "BASE64ENCODED RECEIPT WAS HERE",
"latest_receipt_info" : [ { "expires_date" : "2014-11-12 15:10:33 Etc/GMT",
"expires_date_ms" : "1415805033000",
"expires_date_pst" : "2014-11-12 07:10:33 America/Los_Angeles",
"is_trial_period" : "true",
"original_purchase_date" : "2014-11-12 15:07:34 Etc/GMT",
"original_purchase_date_ms" : "1415804854000",
"original_purchase_date_pst" : "2014-11-12 07:07:34 America/Los_Angeles",
"original_transaction_id" : "1000000131413546",
You can’t perform that action at this time.