Skip to content

Instantly share code, notes, and snippets.

View linus-jansson's full-sized avatar

Linus J linus-jansson

  • Uppsala Municipality
  • Sweden
  • 05:31 (UTC +02:00)
View GitHub Profile
"use client";
import { useState, useEffect } from 'react';
const setQueryParams = <T>(key: string, value: T) => {
if (typeof window === 'undefined')
return undefined;
const url = new URL(window.location.href);
url.searchParams.set(key, JSON.stringify(value));
window.history.pushState({}, '', url.toString());
app.background = gradient(rgb(120, 120, 120), rgb(30, 30, 30))
app.stepsSinceNotification = 0
app.stepsForNotification = 30
class Phone(object):
def __init__(self, appDict, owner, backgroundColor):
self.appDict = appDict
self.owner = owner
self.apps = []