Skip to content

Instantly share code, notes, and snippets.

View mattcassinelli's full-sized avatar

Matthew Cassinelli mattcassinelli

View GitHub Profile
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.developer.icloud-container-identifiers</key>
<array>
<string>iCloud.is.workflow.my.workflows</string>
</array>
<key>get-task-allow</key>
@kjaymiller
kjaymiller / text_to_things3.scptd
Last active October 7, 2021 22:24
AppleScript Import Text to Things3
on run {input, parameters}
set delimitedList to paragraphs of (input as string)
tell application "Things3"
repeat with currentTodo in reverse of delimitedList
set newToDo to make new to do with properties {name:currentTodo} at beginning of list "Inbox"
end repeat
end tell
end run
anonymous
anonymous / file1.txt
Created September 21, 2017 20:42
Gist from Drafts
# HTTP Requests
Drafts 5 scripting is going to be on a whole different level. Can't wait to get this polished up and ready to ship!
@jeroen
jeroen / canny.R
Last active April 1, 2021 14:20
Magick canny edge detector
library(magrittr)
library(magick)
image_read("logo:") %>%
image_convert('png', colorspace = 'gray') %>%
image_edge(radius = 1) %>%
image_negate() %>%
image_transparent('white', 10000) %>%
image_background("white") %>%
image_browse()
@mofirouz
mofirouz / battery-icon.applescript
Last active August 17, 2021 12:53
BetterTouchTool Battery Percentage
do shell script "pmset -g batt | grep InternalBattery | column -t"
set x to the result
set state to word 7 of x
set remaining to the word 10 of x
if state is "discharging" then
return 1
else
return 2
end if
@blach
blach / airpod_availability.html
Last active April 17, 2017 02:50
Checks AirPod store availability by using JavaScript to query Apple's servers. Created with Textastic and works great with its built-in web preview. Uses YQL and JSONP to work around JavaScript's same origin policy. Inspired by https://gist.github.com/omarshahine/f8eb4598af4f1767ab1a9f01662e74b1
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
<title>Check AirPod availability in Apple Stores</title>
<style>
body {
font-size: 12px;
@mdo
mdo / 00-intro.md
Last active November 15, 2024 14:13
Instructions for how to affix an Ikea Gerton table top to the Ikea Bekant sit-stand desk frame.

Ikea Bekant standing desk with Gerton table top

import UIKit
import PlaygroundSupport
let vc = UIViewController()
vc.view.backgroundColor = .white
PlaygroundPage.current.liveView = vc
PlaygroundPage.current.needsIndefiniteExecution = true
let button = UIButton(type: .system)
button.frame = CGRect(x: 0, y: 0, width: 240, height: 120)
@ttscoff
ttscoff / csv-to-mmd-tables.rb
Last active December 1, 2017 02:18
A messy script for converting simple CSV syntax to MultiMarkdown tables, for use in the Markdown Service Tools <http://brettterpstra.com/projects/markdown-service-tools/>
#!/usr/bin/env ruby
require 'csv'
# md - Tables - Create from CSV
# v1.1 2016-08-17
# From the Markdown Service Tools <http://brettterpstra.com/projects/markdown-service-tools/>
# Converts CSV style input to MultiMarkdown tables
# Changelog
# 1.1: Fixed error when line ended with whitespace in middle of input
@chockenberry
chockenberry / finder_icons.sh
Last active February 10, 2024 19:05
A simple shell script to turn the Finders desktop icons on and off
#!/bin/sh
defaults read com.apple.finder CreateDesktop > /dev/null 2>&1
enabled=$?
if [ "$1" = "off" ]; then
if [ $enabled -eq 1 ]; then
defaults write com.apple.finder CreateDesktop false
osascript -e 'tell application "Finder" to quit'
open -a Finder