Skip to content

Instantly share code, notes, and snippets.

View eristoddle's full-sized avatar

Stephan Miller eristoddle

View GitHub Profile
@eristoddle
eristoddle / pandora-exporter.js
Created September 18, 2021 03:09
Pandora Exporter
// Need to throttle this, causes a bad network connection message
(function() {
var pageSize = 100;
var stationPageSize = 250; // IMPORTANT: This script only gets the first page of stations. If you have more than 250 this may be a problem, sorry.
var webname = location.pathname.split("/").pop(); // Seems to be a variation of the username, can be retrieved from the URL
var includeThumbsDown = true;
var allThumbs = [];
// Step one, obtain the AuthToken and CsrfToken which will allow us to make requests to the Pandora API.
@eristoddle
eristoddle / update.kt
Last active February 20, 2021 03:17
Android In-App Update
// Creates instance of the manager.
val appUpdateManager = AppUpdateManagerFactory.create(context)
// Returns an intent object that you use to check for an update.
val appUpdateInfoTask = appUpdateManager.appUpdateInfo
// Checks that the platform will allow the specified type of update.
appUpdateInfoTask.addOnSuccessListener { appUpdateInfo ->
if (appUpdateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE
// For a flexible update, use AppUpdateType.FLEXIBLE
<h1>End-User License Agreement ("Agreement")</h1>
<p>Last updated: March 25, 2020</p>
<p>Please read this End-User License Agreement carefully before clicking the "I Agree" button, downloading or using Boilerplate.</p>
<h1>Interpretation and Definitions</h1>
<h2>Interpretation</h2>
<p>The words of which the initial letter is capitalized have meanings defined under the following conditions. </p>
<p>The following definitions shall have the same meaning regardless of whether they appear in singular or in plural.</p>
package com.eristoddle.boilerplate
import android.content.Context
import android.content.Intent
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/eula_main">
<LinearLayout
android:id="@+id/header"
package com.eristoddle.boilerplate
import android.content.Context
import android.content.Intent
import android.content.SharedPreferences
import android.os.Bundle
import android.text.Spanned
import androidx.appcompat.app.AppCompatActivity
import androidx.core.text.HtmlCompat
import com.google.android.material.snackbar.Snackbar
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/eula_main">
<LinearLayout
android:id="@+id/header"
<h1>End-User License Agreement ("Agreement")</h1>
<p>Last updated: March 25, 2020</p>
<p>Please read this End-User License Agreement carefully before clicking the "I Agree" button, downloading or using Boilerplate.</p>
<h1>Interpretation and Definitions</h1>
<h2>Interpretation</h2>
<p>The words of which the initial letter is capitalized have meanings defined under the following conditions. </p>
<p>The following definitions shall have the same meaning regardless of whether they appear in singular or in plural.</p>
package com.eristoddle.boilerplate
import android.content.Context
import android.content.Intent
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
package com.eristoddle.boilerplate
import android.content.Context
import android.content.Intent
import android.content.SharedPreferences
import android.os.Bundle
import android.text.Spanned
import androidx.appcompat.app.AppCompatActivity
import androidx.core.text.HtmlCompat
import com.google.android.material.snackbar.Snackbar