Skip to content

Instantly share code, notes, and snippets.

@atommclain
atommclain / AfterDarkMacOS.md
Created July 30, 2021 13:02
AfterDark Screen Saver running on macOS (almost)

Flying Toasters Screen Saver

https://www.screensaversplanet.com/help/guides/mac/how-to-install-johnny-castaway-on-mac-os-x-22

  • Install Wineskin
  • Create new wrapper with latest(ish) (I used WS11WineCX20.0.2)
  • Set wrapper to XP in Tools -> Config Utility
  • Download After Dark Tenth Anniversary
  • Mount it
  • Use install from disk in wrapper (this might fail, I had to copy the files from a Windows VM to get it to fully work)
  • Change the following in Tools Registry Editor
  • Create a bat file with the following "C:\WINDOWS\system32\After Dark.scr" /s
@atommclain
atommclain / kill-sticky.js
Last active July 10, 2019 10:58 — forked from drbraden/kill-sticky.js
Kill sticky headers and re-enable scrolling
// Original gist from https://alisdair.mcdiarmid.org/kill-sticky-headers/ (thank you!)
// My only addition is re-enabling scrolling since some sites disable it while
// their pop-up is active.
// Just copy the below and paste it at http://mrcoles.com/bookmarklet/ to
// properly escape the string and create a convenient "this link" that can
// be dragged to the bookmark bar. A more advanced version, also written
// by Mr. Coles, is available on npm: npm -g install bookmarklet
var i, elements = document.querySelectorAll('body *');
for (i = 0; i < elements.length; i++) {
@atommclain
atommclain / methodMacro.m
Last active December 16, 2015 00:29
Objective-C method reflection question
#import <Foundation/Foundation.h>
#import <objc/runtime.h>
#define varString(varname) #varname
#define logPointerInfo(ptr1, ptr2) \
NSLog(@"%s: %p, %s: %p equal: %@", varString(ptr1), ptr1, varString(ptr2), ptr2, (ptr1 - (intptr_t *)ptr2 == 0 ? @"YES" : @"NO"))
@interface ADTestObject : NSObject
@end
@atommclain
atommclain / ZigBee_Lights.md
Last active February 12, 2017 21:58
An informal list of ZigBee lights

##Philips

###Hue http://www2.meethue.com/en-us/the-range/hue/

Name Capabilities Cost lumen output
A19 Connected Bulb Color

Tunable White

$59.95 600 @ 4000K
510 @ 3000K
360 @ 2000K
550 @ 6500K
BR30 Connected Bulb Color

Tunable White

$59.95 630 @ 4000K
538 @ 3000K
376 @ 2000K
581 @ 6500K
GU10 Connected Bulb ColorTunable White $59.95 300 @ 4000K 210 @ 3000K 145 @ 2000K 230 @ 6500K
@atommclain
atommclain / excel
Created February 1, 2012 02:13
The craziest Excel formula ever. Ever.
I made this function for my former girlfriend after she made the mistake of boasting to me about her Excel prowess.
My goal was to make an incredibly large formula that would do something really cool and claim my rightful place as the head dork of the relationship (somewhat contested at the time). To make things interesting I put a few arbitrary constraints like limiting my self to one mongo formula, and as much as possible obscuring what it actually did.
You can check it out by creating a new worksheet, adjusting all the column widths to 0.13" and all the row heights to 0.18". Paste 'the formula' into all the visible cells. Make sure you have some tissues handy as what you will be witnessing will bring you to nothing less than tears.
=IF(MID((CONCATENATE(REPT("0",8)&HEX2BIN("1e",8)&HEX2BIN("28",8)&HEX2BIN("28",8)&HEX2BIN("1e",8)&REPT("0",16)&HEX2BIN("2c",8)&HEX2BIN("52",8)&HEX2BIN("2a",8)&HEX2BIN("4",8)&HEX2BIN("a",8)&REPT("0",16)&HEX2BIN("3e",8)&HEX2BIN("10",8)&HEX2BIN("8",8)&HEX2BIN("10",8)&HEX2BIN("3e"