Skip to content

Instantly share code, notes, and snippets.

@Saturn-V
Saturn-V / ViewController.swift
Created March 1, 2024 23:12
Persistent Auth using the Spotify iOS SDK [attempt]
import UIKit
import SwiftUI
@available(iOS 14.0, *)
class ViewController: UIViewController, SPTSessionManagerDelegate, SPTAppRemoteDelegate, SPTAppRemotePlayerStateDelegate {
@AppStorage("clientSession") var clientSession = Data()
private let SpotifyClientID = "[REDACTED]"
private let SpotifyRedirectURI = URL(string: "spotify-login-sdk-test-app://spotify-login-callback")!
var TRIANGLE_WIDTH, TRIANGLE_HEIGHT, NUM_ROWS, TRIANGLE_WIDTH_HALF;
function setup() {
createCanvas(750, 750);
// background('#f9a825');
NUM_ROWS = 8; //Modify me
TRIANGLE_WIDTH = height / NUM_ROWS;
TRIANGLE_WIDTH_HALF = (TRIANGLE_WIDTH / 2);
TRIANGLE_HEIGHT = TRIANGLE_WIDTH;
var NUM_ROWS, DIA, RAD;
function setup() {
createCanvas(300, 300);
background('#f9a825');
NUM_ROWS = 8; //modify me if u wish
//determines radius and diameter based on NUM_ROWS
RAD = height / NUM_ROWS;
DIA = 2 * RAD;
@Saturn-V
Saturn-V / errors.js
Created February 3, 2016 03:43
Meteor errors after removing 'insecure' package.
// => Your application has errors. Waiting for file change.
// => Modified -- restarting.
// => Errors prevented startup:
// While processing files with ecmascript (for target web.browser):
// client/views/allCourses/allCourses.js:2:10: client/views/allCourses/allCourses.js: Unexpected token (2:10)
// client/views/courseDetails/courseDetails.js:20:10: client/views/courseDetails/courseDetails.js: Unexpected token (20:10)
// client/views/departmentOverview/departmentOverview.js:6:11: client/views/departmentOverview/departmentOverview.js: Unexpected token (6:11)
// client/views/home/home.js:19:10: client/views/home/home.js: Unexpected token (19:10)
// client/views/templates/posts.js:2:5: client/views/templates/posts.js: Unexpected token (2:5)
@Saturn-V
Saturn-V / index
Created February 8, 2015 11:13
Alex's app
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0