Skip to content

Instantly share code, notes, and snippets.

View ThatsJustCheesy's full-sized avatar

Ian Gregory ThatsJustCheesy

View GitHub Profile
@ThatsJustCheesy
ThatsJustCheesy / YouTube - Hide End Cards (unless hovering).user.css
Last active February 26, 2021 06:15
Remove suggestion walls from YouTube embeds and the end of videos
/* ==UserStyle==
@name YouTube No Suggested Videos
@author Ian Gregory (igregory.ca)
@description Fork of https://userstyles.org/styles/101376/disable-youtube-video-wall
@version v1.0.0
@namespace igregory.ca
@license MIT
==/UserStyle== */
@-moz-document regexp(".*")
@ThatsJustCheesy
ThatsJustCheesy / init.lua
Last active September 19, 2024 06:16
Hammerspoon web browser picker (set Hammerspoon as your default web browser and add this code to your config)
hs.urlevent.httpCallback = function(scheme, host, params, fullURL)
if host == nil then
host = 'file'
end
local success, _, res = hs.osascript.applescript('choose from list {"Safari", "Brave"} with prompt "Open '..host..' with…"');
local app
if success and res:match('Safari') ~= nil then
app = 'com.apple.Safari'
elseif success and res:match('Brave') ~= nil then
app = 'com.brave.Browser'
@ThatsJustCheesy
ThatsJustCheesy / PreferencesViewController.swift
Last active August 30, 2019 21:14 — forked from mminer/PreferencesViewController.swift
NSTabViewController for preferences window that resizes itself to fit activated tab view.
// Thanks to mminer on GitHub
// https://gist.github.com/mminer/caec00d2165362ff65e9f1f728cecae2
import Cocoa
class PreferencesViewController: NSTabViewController {
private lazy var tabViewSizes: [NSTabViewItem: NSSize] = [:]
private var lastSelectedTabViewItem: NSTabViewItem? = nil
@ThatsJustCheesy
ThatsJustCheesy / KSImageView.h
Last active August 18, 2018 23:40 — forked from vigorouscoding/KSImageView.h
Forked from @vigorouscoding 's original and modernized. NSImageView subclass to get the filename of the dropped image and to disable deleting and cutting the image. The class sends a "KSImageDroppedNotification" with the image filename in the userinfo dictionary. vigorouscoding got the idea from: http://www.cocoabuilder.com/archive/cocoa/121824-…
#import <Cocoa/Cocoa.h>
@interface KSImageView : NSImageView
@end
@ThatsJustCheesy
ThatsJustCheesy / HIServicesPrivate_v1.h
Created August 21, 2017 00:39
Private interfaces in HIServices.framework (subframework of ApplicationServices.framework) that message the Dock to set preferences on-the-fly.
// HIServicesPrivate.h v1
// By ThatsJustCheesy
// TO USE THESE INTERFACES, you MUST link against ApplicationServices.framework.
#pragma once
#ifdef __cplusplus
extern "C" {
#endif