Skip to content

Instantly share code, notes, and snippets.

View Makiah's full-sized avatar

Makiah Bennett Makiah

  • Northeastern University
  • MA, USA
View GitHub Profile
@Makiah
Makiah / CreateMonthCalendar.scpt
Last active November 13, 2017 03:31
Used to generate school calendars for Apple Calendars (iCal whatever) for NHS schedules.
// Create the application.
var app = Application.currentApplication()
// Ensure that we have the Calendar application available for use.
app.includeStandardAdditions = true
// This function is used when we need to prompt the user for something.
function askUser(prompt) {
var response = app.displayDialog(prompt, {
defaultAnswer: "",
@SamusAranX
SamusAranX / BARS format (to the best of my knowledge).txt
Last active August 17, 2024 22:38
BARS extractor (with improvised documentation)
IMPORTANT: All offsets are taken from KorokPot.bars! Actual offsets of dynamic-length data may vary in other files, but based
on the information here, it shouldn't be hard to find the real offsets. When in doubt, look at the code.
╒══════════╤══════════╤═════════╤════════════════════╤═══════════╤═════════════════════════╤════════════════════════════════════════════════════════════════════════╕
│ Offset │ -> Dec │ Size │ -> Dec │ Type │ Name │ Information │
╞══════════╪══════════╪═════════╪════════════════════╪═══════════╪═════════════════════════╪════════════════════════════════════════════════════════════════════════╡
│ 0x0 │ 0 │ 0x4 │ 4 │ │ BARS header │ Indicates that this is, in fact, a BARS file │
├──────────┼──────────┼─────────┼────────────────────┼───────────┼─────────────────────────┼────────────────────────────────────
@JamesMarino
JamesMarino / TouchBar
Created May 15, 2017 01:53
Disable the TouchBar
#!/bin/bash
function enableTouchBar() {
local presentationModeProperties="<dict><key>app</key><string>fullControlStrip</string><key>appWithControlStrip</key><string>fullControlStrip</string><key>fullControlStrip</key><string>app</string></dict>"
defaults delete com.apple.touchbar.agent PresentationModeGlobal
defaults write com.apple.touchbar.agent PresentationModeFnModes $presentationModeProperties
launchctl load /System/Library/LaunchAgents/com.apple.controlstrip.plist