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
// | |
// OCXML.swift | |
// Created by Marco Arment on 9/23/24. | |
// | |
// Released into the public domain. Do whatever you'd like with this. | |
// No guarantees that it'll do anything, or do it correctly. Good luck! | |
// | |
import Foundation |
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
javascript:(function()%7Bwindow.location.href%3D'https%3A%2F%2F12ft.io%2F'%2Bwindow.location.href%3B%7D)() |
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
// Based on code by Efrén Gámez <https://gist.github.com/ImGamez/a8f9d77bf660d7703cc96fee87cdc4b0> | |
// and modified by Max Zeryck <https://talk.automators.fm/t/widget-examples/7994/217> | |
// this version by Jason Snell. parsing weatherkit data directly is beyond the scope of this widget; | |
// it loads a dumped weatherkit JSON from a remote server. Supply your own. | |
// This widget also loads live data from a weather station, again in a custom format. | |
// You will need to replace both of these data sources in order to get weather other than mine. | |
const highTemps = [ ] | |
const dailyConditions = [ ] |
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
javascript:(function () { | |
/* ======================================== | |
Mastodon thread scraper, by Rick Osborne. | |
Copy this entire file, from the opening "javascript:" to the last "();". | |
Create a new bookmark in your browser, using the copied text as the URL. | |
When you are on a Mastodon thread page, activate this bookmark. | |
======================================== */ | |
function findOne(parent, selector, block) { | |
if (parent == null) { | |
return undefined; |
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
// Before 😕 | |
let doingSomethingToOptionalView1: CGFloat? = { | |
guard let firstSubview = subviews.first else { return nil } | |
return (firstSubview.bounds.width / 2.0) + otherView.bounds.width | |
}() | |
// After 😊 | |
let doingSomethingToOptionalView2 = subviews.first.useIfNotNil { ($0.bounds.width / 2.0) + otherView.bounds.width } | |
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
<?php | |
/* | |
A simple PHP class to perform basic operations against Amazon S3 and compatible | |
services. Requires modern PHP (7+, probably) with curl, dom, and iconv modules. | |
Copyright 2022 Marco Arment. Released under the MIT license: | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights |
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
<?php | |
// Register a Book post type | |
$args = array( | |
'labels' => generate_post_type_labels( 'book', 'books' ), | |
'public' => true, | |
'publicly_queryable' => true, | |
'show_ui' => true, | |
'show_in_menu' => true, | |
'query_var' => true, |
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
#include <Servo.h> | |
Servo s; | |
int pos[] = { 90, 80, 65, 120, 105, 110, 98, 68, 84, 74}; | |
int d[] = {3000, 500, 1200, 1530, 700, 200, 800, 450, 300, 670}; | |
void setup() { | |
s.attach(6); // <---- Change 6 to the pin you're using | |
} |
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
/* | |
Thanks to Elliotmade for the inspiration on this project | |
https://elliotmade.com/2020/04/23/physical-mute-button-for-zoom-meetings/ | |
Refactored by HaxNobody to extend functionalty | |
https://gist.github.com/HaxNobody/7bde369d7a41348b8b91c1a4f358ea4a#file-zoommutebutton-ino | |
This program will send USB HID keyboard presses to bring the Zoom window into | |
the foreground and activate microphone and video functions. | |
* A momentary press on button 1 will toggle mute on or off. | |
* Press and hold button 1 to close zoom (Zoom Needs to be in focus on a Mac (Or you will close a different window)). | |
*/ |
NewerOlder