Skip to content

Instantly share code, notes, and snippets.

@mpfaff
mpfaff / README.md
Last active May 29, 2020 21:27
User JavaScript and CSS files

CSS Overrides

CSS overrides for websites. These themes all work on the User JavaScript and CSS Chrome extension. Try that extension before commenting that one of them doesn't work for you.

GitLab

gitlab.com.css

This is a dark theme I threw together in around 2 hours for GitLab, after being fed up with my eyes being on fire. This theme is not ready for everyday use.

@mpfaff
mpfaff / main.dart
Created June 19, 2020 20:41
Example of TweenSequence<Color> for a PageView
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@mpfaff
mpfaff / ontario-whsa-certificate.js
Last active September 8, 2023 17:13
Speedrun your "Worker Health and Safety Awareness in 4 Steps"
function getCertificate(firstName, lastName, course, forceDownload, language, email) {
function base64Encode(data) {
var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
var o1, o2, o3, h1, h2, h3, h4, bits, i = 0,
ac = 0,
enc = "",
tmp_arr = [];
if (!data) {
return data;
}
@mpfaff
mpfaff / osg-aoda-certificate.js
Created September 8, 2023 17:31
Speedrun your OSG "Accessibility for Ontarians with Disabilities Act" certificate
const fs = require("fs");
const { randomUUID } = require("crypto");
async function register({email, name, company, phone}) {
const body = JSON.stringify({ email, full_name: name || "", company: company || "", phone: phone || "" });
console.log(body);
return await fetch("https://0rxyymz0p0.execute-api.ca-central-1.amazonaws.com/prod/user", {
"credentials": "omit",
"headers": {