Skip to content

Instantly share code, notes, and snippets.

View riccjohn's full-sized avatar
☠️

John Riccardi riccjohn

☠️
View GitHub Profile
// ==UserScript==
// @name Display current year PTO only
// @namespace MetricAi
// @version 2024-03-26
// @description Hides PTO from previous & future calendar years
// @author You
// @match https://psa.metric.ai/home/my-timeoff/policies/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=metric.ai
// @grant none
// ==/UserScript==
// ==UserScript==
// @name MetricAI Max Width
// @namespace MetricAi
// @version 2024-03-29
// @description Make content full width
// @author You
// @match *://psa.metric.ai/home/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=metric.ai
// @grant none
// ==/UserScript==
{
"id": 123,
"name": "School Name",
"slug": "school-name",
"programs": [
{
"id": 123,
"name": "Program Name",
"slug": "program-name",
"terms": [
{
"user": {
"username": "username",
"email": "email@email.com",
"school_ids": [1],
"roles": "partner"
},
"school": {
"id": 123,
"name": "School Name",
@riccjohn
riccjohn / RobotListViewController_Inheritance.swift
Last active December 5, 2019 15:16
RobotListViewController - Inheritance
public class RobotListViewController: UITableViewController {
@IBOutlet public var robotTableView: UITableView!
let tableView:UITableView = UITableView()
let robots: [Robot] = [
Robot(id: 1, name: "Woofbot"),
Robot(id: 2, name: "Barkbot")
]
override public func viewDidLoad() {
// A dog has bark + eat
class Dog {
let dogBark = BarkingSkill()
let dogEat = EatingSkill()
public func bark() {
dogBark.bark()
}
public func eat() {
class BarkingSkill {
public func bark() {
print("woof!")
}
}
class EatingSkill {
public func eat() {
print("nom nom nom")
}
class Animal {
func eat() {
print("nom nom nom")
}
}
class Dog: Animal {
func bark() {
print("woof!")
}
class Dog {
func bark() {
print("woof!")
}
func eat() {
print("nom nom nom")
}
}
class Robot {
@riccjohn
riccjohn / RobotListViewController.swift
Last active December 5, 2019 15:18
RobotListViewController - Composition
public class RobotListViewController: UIViewController {
@IBOutlet public var robotTableView: UITableView!
public let robotsDataSource = RobotListTableViewDataSource()
let robots: [Robot] = [
Robot(id: 1, name: "Wooftot"),
Robot(id: 2, name: "Barkbot")
]
override public func viewDidLoad() {