Skip to content

Instantly share code, notes, and snippets.

NSWindow *overlay = [[NSPanel alloc] initWithContentRect:[[NSScreen mainScreen] frame] styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO];
[overlay setOpaque:NO];
[overlay setBackgroundColor:[NSColor clearColor]];
[overlay setHidesOnDeactivate:NO];
[overlay setFloatingPanel:YES];
[overlay setLevel:NSScreenSaverWindowLevel-1];
[overlay setIgnoresMouseEvents:YES];
[overlay setSharingType:NSWindowSharingNone];
[overlay setAlphaValue:0];
[overlay setCollectionBehavior:NSWindowCollectionBehaviorCanJoinAllSpaces];
@bumper314
bumper314 / gist:fe63d1cdf2ac7a633796eac7e59262c6
Created July 15, 2019 22:13
Neo International Characters
á: option-E, A
é: option-E, E
í: option-E, I
ó: option-E, O
ú: option-E, U
Á: option-E, shift-A
É: option-E, shift-E
Í: option-E, shift-I
Ó: option-E, shift-O
Ú: option-E, shift-U
@bumper314
bumper314 / Script.applescript
Created August 6, 2018 22:45
Fix for finding the right "front most window" in an app
tell application "System Events"
set myFrontMost to name of first item of (processes whose frontmost is true)
tell application process myFrontMost
-- The trick here is that you can't rely on "window 1" to be the one you're after,
-- So let's filter the UI elements list by subroles.
-- Emacs return a a total bogus AXTextField:AXStandardWindow, but we can stil work with it
set theWindows to (every UI element whose subrole is "AXStandardWindow")
-- For Activity Monitor (others?)
if theWindows is {} then set theWindows to (every UI element whose subrole is "AXDialog")
$ apt install ./gforth_0.7.3_arm.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'gforth' instead of './gforth_0.7.3_arm.deb'
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
@bumper314
bumper314 / gist:f171dc3f47b503d630e131124eedd966
Created June 27, 2017 16:23
Console errors trying to run Tinderbox 7.1.0 on OS X 10.9.5
06/27/17 4:09:32.168 AM Tinderbox 7[33810]: -[NSOperationQueue setQualityOfService:]: unrecognized selector sent to instance 0x6100004258a0
06/27/17 4:09:32.171 AM Tinderbox 7[33810]: (
0 CoreFoundation 0x00007fff8c38a25c __exceptionPreprocess + 172
1 libobjc.A.dylib 0x00007fff901b3e75 objc_exception_throw + 43
2 CoreFoundation 0x00007fff8c38d12d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x00007fff8c2e8272 ___forwarding___ + 1010
4 CoreFoundation 0x00007fff8c2e7df8 _CF_forwarding_prep_0 + 120
5 Tinderbox 7 0x000000010fed1427 _ZN6ChangeC2Ev + 151
6 Tinderbox 7 0x000000010fe971f8 _ZN9HypertextC2Ev + 136
7 Tinderbox 7 0x000000011017dc00 -[TbxDocumentOpener initializeHypertext] + 96
#!/bin/bash
read -d '' files << EOF
22207-0-f
22207-1-f
22207-2-f
22207-3-f
22207-4-f
22207-5-f
22207-6-f
@bumper314
bumper314 / Tedious
Created April 1, 2017 17:14
#tags: baz
Please work
@bumper314
bumper314 / gist:9954f261bb9cee9fd9fa7208a3d18637
Last active April 1, 2017 17:12
Test public #tags: bar
asdf
@bumper314
bumper314 / The Flooding Basement.html
Last active April 1, 2017 17:10
[I'm a title] This box isn't big enough to put all this info in #tags: foo, bar
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8"/>
</head>
<body>
<h2 id="thefloodingbasementproblem">The Flooding Basement Problem</h2>
<p><strong>An analogy:</strong> Running a business is like being in a basement with a leaky water main<a href="#fn:1" id="fnref:1" title="see footnote" class="footnote">[1]</a>. If you&#8217;re alone, you can either work on the water main or you can bail out water. You can&#8217;t do both at the same time, it&#8217;s physically impossible. So in the beginning I worked on the water main a little and bail out water in the meantime.</p>
==> keybase has been moved to Homebrew-Cask.
==> brew uninstall --force keybase
Uninstalling keybase... (8 files, 73.7M)
==> brew prune
Pruned 2 symbolic links and 4 directories from /usr/local
==> brew cask install keybase
==> Downloading https://prerelease.keybase.io/Keybase.dmg
######################################################################## 100.0%
==> No checksum defined for Cask keybase, skipping verification
==> Moving App 'Keybase.app' to '/Applications/Keybase.app'