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
// When using in-browser PDF viewer, you can inspect it and run this in the console | |
// It's using CSS Blending to invert the colors of the PDF | |
function togglePDFDarkMode() { | |
var cover = document.createElement("div"); | |
let inversion = ` | |
position: fixed; | |
pointer-events: none; | |
top: 0; | |
left: 0; | |
width: 100vw; |
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
Slayer's Testament I | |
In the first age, in the first battle, when the shadows first lengthened, one stood. Burned by the embers of Armageddon, his soul blistered by the fires of Hell and tainted beyond ascension, he chose the path of perpetual torment. In his ravenous hatred he found no peace; and with boiling blood he scoured the Umbral Plains seeking vengeance against the dark lords who had wronged him. He wore the crown of the Night Sentinels, and those that tasted the bile of his sword named him... the Doom Slayer. | |
Slayer's Testament II | |
Tempered by the fires of Hell, his iron will remained steadfast through the passage that preys upon the weak. For he alone was the Hell Walker, the Unchained Predator, who sought retribution in all quarters, dark and light, fire and ice, in the beginning and the end, and he hunted the slaves of Doom with barbarous cruelty; for he passed through the divide as none but demon had before. | |
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
{ | |
"lights": { | |
"1": { | |
"state": { | |
"on": true, | |
"bri": 254, | |
"hue": 0, | |
"sat": 211, | |
"xy": [ | |
0.6251, |
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 Foundation | |
import UIKit | |
extension UIColor { | |
convenience init(hexString: String) { | |
var hexString: String = hexString.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines) | |
if (hexString.hasPrefix("#")) { | |
hexString.removeFirst() |
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
LA | |
https://www.youtube.com/watch?v=iFBP0zpTj-o | |
Portland | |
https://www.periscope.tv/w/1djxXQVdeyNKZ | |
🦄 | |
https://www.pscp.tv/w/1RDxlQzdEpdKL | |
Good gifs: |
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
# on my MBP, this sets the screen backlight brightness to max much faster than any of the other working methods I've found | |
# nobody seems to demonstrate that you can send a stream of events when they show how this can be used | |
# might be 145 or similar on your hardware, try one at a time first: | |
# osascript -e 'tell application \"System Events\"' -e 'key code 144' -e ' end tell' | |
alias bri="osascript -e 'tell application \"System Events\"' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' -e 'key code 144' - |
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
// Avoids the keyboard in a UIKit app by leveraging additionalSafeAreaInsets. | |
// You can put this in the root view controller so the whole app will avoid the keyboard. | |
// Only tested on iOS 13.3. | |
// Made for https://douglashill.co/reading-app/ | |
@objc func updateSafeAreaForKeyboardFromNotification(_ notification: Notification) { | |
guard let endFrameInScreenCoords = notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? CGRect else { | |
return | |
} | |
// Please consider whether the force unwrap here is safe for your own use case. |
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/zsh | |
# | |
# | |
# Iconizer shell script by Steve Richey (srichey@floatlearning.com) | |
# Modified by Rich Ellis (rich@richellis.net) based on contributions on Github from crishoj, giria | |
# Further modified by Nick Pannuto (sneakyness@sneakyness.com) based on gist comments from previous forks | |
# https://gist.github.com/steverichey/8493f3bd31ae71a9c933/forks | |
# | |
# Changelog: |
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
//: A Cocoa based Playground to present user interface | |
import AppKit | |
import PlaygroundSupport | |
import Foundation | |
import CoreImage | |
import ImageIO | |
let nibFile = NSNib.Name("MyView") | |
var topLevelObjects : NSArray? |
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 Foundation | |
enum ChampionString: String, Codable { | |
case ranger = "RANGER" | |
case scalebearer = "SCALEBEARER" | |
case visor = "VISOR" | |
case anarki = "ANARKI" | |
case nyx = "NYX" | |
case sorlag = "SORLAG" | |
case clutch = "CLUTCH" |
NewerOlder