This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// HIServicesPrivate.h v1 | |
// By ThatsJustCheesy | |
// TO USE THESE INTERFACES, you MUST link against ApplicationServices.framework. | |
#pragma once | |
#ifdef __cplusplus | |
extern "C" { | |
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Cocoa/Cocoa.h> | |
@interface KSImageView : NSImageView | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ==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(".*") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
script_canonical_name='?' | |
file="${1:-$(pwd)}" | |
if [[ -h "$file" ]] | |
then | |
echo "$script_canonical_name: is a link to $(readlink "$file")" | |
file=$(realpath "$file") | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#include<math.h> | |
int | |
main | |
() | |
{; | |
int | |
x= | |
(( | |
void |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Either use from the command line, or put in an Automator workflow | |
# that takes files as input and save it as a Quick Action. | |
# For bonus points, assign a nice keyboard shortcut. | |
for file | |
do | |
xattr -r -d com.apple.quarantine "$file" | |
open "$file" | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nc -l $IN_PORT | bash -c "while true; do read msg; osascript -e \" display notification \\\"\$msg\\\" \" & done" | |
nc $OUT_ADDRESS $OUT_PORT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Proc(*T, R) | |
def curry | |
{% begin %} | |
{% for i in 0...T.size %} | |
->(arg_{{i}} : {{T[i]}}) { | |
{% end %} | |
self.call( | |
{% for i in 0...T.size %} | |
arg_{{i}}, | |
{% end %} |
OlderNewer