Skip to content

Instantly share code, notes, and snippets.

View gunantosteven's full-sized avatar
👊
Work from home

Steven Gunanto gunantosteven

👊
Work from home
View GitHub Profile
@marcolabreu
marcolabreu / apple-receipt-firebase-validator.ts
Last active January 6, 2023 12:29
Firebase function to validate Apple receipts
import {https} from 'firebase-functions';
import bent = require("bent");
/*
* Docs
* https://firebase.google.com/docs/functions/typescript
* https://developer.apple.com/documentation/appstorereceipts/verifyreceipt
*/
/*
@cbeyls
cbeyls / MultiChoiceHelper.java
Last active October 28, 2024 18:23
Helper class to reproduce ListView's modal MultiChoice mode with a RecyclerView. Compatible with API 7+.
package be.digitalia.common.widgets;
import android.content.Context;
import android.os.Build;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.support.v4.util.LongSparseArray;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.view.ActionMode;
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],