Skip to content

Instantly share code, notes, and snippets.

View atnbueno's full-sized avatar
👨‍💻
🏴󠁵󠁳󠁣󠁡󠁿 Girona, Spain ⌚UTC+2

Antonio Bueno atnbueno

👨‍💻
🏴󠁵󠁳󠁣󠁡󠁿 Girona, Spain ⌚UTC+2
View GitHub Profile
@kconner
kconner / macOS Internals.md
Last active June 27, 2024 18:48
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@drewkerr
drewkerr / set-focus-mode.js
Created April 13, 2022 14:51
Set a Focus mode on macOS Monterey (12.0+) using JavaScript for Automation (JXA)
function toggleFocus(focus) {
const app = Application("System Preferences")
const pane = app.panes.byId("com.apple.preference.notifications").anchors.byName("Focus")
app.reveal(pane) // Open the preference pane
// Useful way of inspecting the UI hierarchy of an open app:
// Application("System Events").applicationProcesses.byName("System Preferences").entireContents()
const ui = Application("System Events").applicationProcesses.byName("System Preferences").windows.byName("Notifications & Focus").tabGroups.at(0)
@drewkerr
drewkerr / get-focus-mode.js
Last active May 29, 2024 16:16
Read the current Focus mode on macOS Monterey (12.0+) using JavaScript for Automation (JXA)
const app = Application.currentApplication()
app.includeStandardAdditions = true
function getJSON(path) {
const fullPath = path.replace(/^~/, app.pathTo('home folder'))
const contents = app.read(fullPath)
return JSON.parse(contents)
}
function run() {
@dcatanzaro
dcatanzaro / widget-html-css-scriptable-jobs.js
Last active January 17, 2022 05:20
Widget con HTML y CSS en Scriptable
//Twitter: https://twitter.com/DamianCatanzaro
const html = "<html> \
<head> \
<style> \
body { \
margin: 0; \
background-color: cyan; \
width: 500px; \
height: 500px; \
@0xallie
0xallie / urlschemes.json
Last active April 27, 2024 04:45
iOS app URL schemes for Icon Themer shortcut
{
"com.8bit.bitwarden": " ",
"com.agilebits.onepassword-ios": "onepassword://",
"com.apple.airport.mobileairportutility": "apmanage://",
"com.apple.appleseed.FeedbackAssistant": "applefeedback://",
"com.apple.AppStore": "itms-apps://itunes.apple.com/",
"com.apple.AppStoreConnect": "shortcuts://run-shortcut?name=Icon%20Themer&input=%7B%22launch%22%3A%22Connect%22%7D",
"com.apple.artistconnect": "shortcuts://run-shortcut?name=Icon%20Themer&input=%7B%22launch%22%3A%22Artists%22%7D",
"com.apple.bnd": "beatsbond://",
"com.apple.Bridge": "com.apple.bridge://x",
@atoponce
atoponce / rates.md
Last active April 12, 2024 21:23
Verifiable brute force strength rates across different projects

Verifiable brute force strength

Below are table of various projects that can completely exhaust n-bits of keyspace. In other words, counting completely and fully from 0 to 2ⁿ-1.

This Gist implies no discussion about how this is relevant to quantum computing using Grover's algorithm, meet-in-the-middle or birthday attacks, or anything of the like. It's strictly a Gist about raw speed, measuring the result in bits.

If you know of other noteworthy and verifiable brute force searching projects,

@andrewplus
andrewplus / iphone-png-images-normalizer.py
Last active July 8, 2021 14:47
Based off a program by Axel E. Brzostowski. https://axelbrz.com/?mod=iphone-png-images-normalizer Makes the script work properly in Python 3+. Tested with 3.7.
#---
# iPIN - iPhone PNG Images Normalizer v1.0
# Copyright (C) 2007
#
# Author:
# Axel E. Brzostowski
# http://axelbrz.com/
# axelbrz@gmail.com
#
# Python 3+ compatibility added by andrew.plus. Tested with 3.7
@JMichaelTX
JMichaelTX / JXA Resources.md
Last active June 1, 2024 17:33
JavaScript for Automation (JXA) Resources

JXA Resources

Revised: 2019-11-28 16:16 GMT-6

JXA

This is a list of the key resources I have found useful. If you know of others, please post in a comment below, and I will add to this list.

I have tried to order this list in the order that, to me, is best for learning JXA from scratch. We all learn a bit diferently, so adjust to suit your style/needs. Please post if you have suggestions on learning JXA.