Check out the repo instead. The Wisdom of Quinn Now with 100% more archived PDFs.
Informative DevForum posts from everyone's favorite DTS member.
(Arranged newest to oldest)
#import <Foundation/Foundation.h> | |
#define ARC4RANDOM_MAX 0x100000000 | |
int main(int argc, const char * argv[]) | |
{ | |
@autoreleasepool { | |
long double hit = 0; |
// Speed limiter | |
- (void)shipSpeedLimit { | |
// Check the x velocity | |
if (self.ship.physicsBody.velocity.dx > 500) { | |
self.ship.physicsBody.velocity = CGVectorMake(500, self.ship.physicsBody.velocity.dy); | |
} else if (self.ship.physicsBody.velocity.dx < -500) { | |
self.ship.physicsBody.velocity = CGVectorMake(-500, self.ship.physicsBody.velocity.dy); | |
} | |
// | |
// StoryboardExtensionsBeta4Fix.swift | |
// | |
// A workaround so that you can use SplitView | |
// and TabView items in OS X Storyboards on | |
// 10.10. Just drop this in your Swift project. | |
// | |
// Hopefully the need for this goes away in soon | |
// as it used to work. |
func getUptime() -> Int { | |
let nanoseconds = DispatchTime.now() | |
return Int(nanoseconds.rawValue / 1000000000) | |
} |
import Foundation | |
// Code-golf version | |
let inputFile = URL(fileReferenceLiteralResourceName: "input.txt") | |
print(try! String(contentsOf: inputFile).components(separatedBy: .newlines).compactMap { Float($0) }.map { Int(($0 / 3).rounded(.down) - 2) }.reduce(0, +)) | |
// Fancy version | |
typealias ModuleHopper = [Module] | |
typealias MassCalculations = [Float] |
import Cocoa | |
typealias IntcodeProgram = [Int] | |
func loadInput() throws -> IntcodeProgram { | |
do { | |
let inputFile = URL(fileReferenceLiteralResourceName: "input.txt") | |
let rawInput = try String(contentsOf: inputFile) | |
let splitFile = rawInput.components(separatedBy: .punctuationCharacters) | |
return splitFile.compactMap { Int($0) } |
Check out the repo instead. The Wisdom of Quinn Now with 100% more archived PDFs.
Informative DevForum posts from everyone's favorite DTS member.
(Arranged newest to oldest)
alias anka='sudo /usr/local/bin/anka' | |
alias ankacluster='sudo /usr/local/bin/ankacluster' | |
alias clusterjoin='sudo ankacluster join http://<YOUR_CONTROLLER> -m 3 -H `hostname`' | |
alias clusterdisjoin='sudo ankacluster disjoin' | |
alias lsvm='sudo anka list' |
#!/bin/zsh | |
zparseopts -E -D -- D:=DOMAIN -domain:=DOMAIN d=DNS -dns=DNS | |
DOMAIN=$DOMAIN[2] | |
DNS=$DNS | |
if [[ -z $DOMAIN ]]; then | |
echo "adlookupos.sh: Troubleshoot DNS service records needed for AD." | |
echo "\nUsage: adlookups.sh [-d] [-D domain]" |
If you want to change things on the root drive of a Mac you will need to take some steps to disable the built in security of the system. Most of these steps are the same regardless if you are on Intel or Apple Silicon. If there is a difference it is noted.
Note that all of these things put a Mac into an unsupported and less secure state.
Make sure you either perform these steps in a VM or that you reset the protections after you are done poking around
(This list is not exahustive on the details of each. Check the links at the end for more info.)