Skip to content

Instantly share code, notes, and snippets.

View larryaasen's full-sized avatar

Larry Aasen larryaasen

View GitHub Profile
@larryaasen
larryaasen / Show Bluetooth Preferences.scpt
Created April 11, 2023 11:06
Show the macOS Bluetooth pane in System Preferences
-- Show the Bluetooth pane in System Preferences.
launch application "System Settings"
activate application "System Settings"
tell application "System Settings"
set current pane to pane id "com.apple.preferences.bluetooth"
end tell
@larryaasen
larryaasen / Camera Settings.scpt
Last active March 27, 2022 17:02
Open the Camera Settings app from Logitech, and update the camera settings
-- Open the Camera Settings app from Logitech. Update the camera settings.
-- This AppleScript was tested and used on the Logitech HD Pro Webcam C920.
launch application "Camera Settings"
activate application "Camera Settings"
tell application "Camera Settings"
tell application "System Events"
click button "Home" of window "Logitech Camera Settings" of application process "Camera Settings"
click button "Widescreen" of window "Logitech Camera Settings" of application process "Camera Settings"
@larryaasen
larryaasen / main.yml
Created February 13, 2020 02:15
GitHub Action for Flutter app using macOS and running Flutter tests
on:
push:
branches:
- '*'
jobs:
build-and-test:
runs-on: macOS-latest
steps:
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" version="2.0">
<channel>
<title>My Cleveland Clinic - Appcast</title>
<item>
<title>Version 1.15.0</title>
<description>Cleveland Clinic Patient App</description>
<pubDate>Wed, 23 Oct 2019 12:00:00 +0000</pubDate>
<enclosure url="https://play.google.com/store/apps/details?id=org.ccf.patientapp" sparkle:version="1.15.0" sparkle:os="iOS" />
</item>
@larryaasen
larryaasen / server2.go
Last active February 25, 2018 15:45
GraphQL sample using graphql-go/graphql and Go (Golang)
/*
Install:
$ go get github.com/graphql-go
$ go run server2.go
Examples:
http://localhost:8080/graphql?query={users{name}}
http://localhost:8080/graphql?query={user(id:"1"){name}}
*/
@larryaasen
larryaasen / server.go
Created February 25, 2018 14:32
GraphQL sample using neelance/graphql-go and Go (Golang)
/*
Examples:
http://localhost:8080/graphql?query={person(id:1000){id firstName lastName}}
http://localhost:8080/graphql?query={person(id:"1000"){id}}
*/
package main
import (
@larryaasen
larryaasen / tvos-font-names.txt
Created January 17, 2018 11:35
tvOS Font Names as of 11.2
AmericanTypewriter
AmericanTypewriter-Bold
AmericanTypewriter-Condensed
AmericanTypewriter-CondensedBold
AmericanTypewriter-CondensedLight
AmericanTypewriter-Light
AmericanTypewriter-Semibold
AppleColorEmoji
AppleSDGothicNeo-Bold
AppleSDGothicNeo-Light
@larryaasen
larryaasen / generate_tvos_images.sh
Created December 29, 2017 18:37
Generate the image files needed for a tvOS app.
#!/bin/sh
# generate_tvos_images.sh
# Generate the image files needed for a tvOS app. These images are a solid color and can be used
# for initial TestFlight builds before branding is applied.
# This script uses ImageMagick: https://www.imagemagick.org/script/download.php
# Apple Human Interface Guidelines for tvOS: https://developer.apple.com/tvos/human-interface-guidelines/icons-and-images/app-icon/
{
"id": "6bc14eecc87637bcf249d2a9ff3c1846",
"backgroundColor": "",
"title": "The First Board",
"widgets": [{
"webview": {
"title": "First Widget",
"html": "<body>Hello</body>"
}
@larryaasen
larryaasen / gist:7100624
Last active December 26, 2015 05:29
Android Java code to inflate a view in code and set the text size of a TextView.
LayoutInflater inflater = (LayoutInflater)this.mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View view = inflater.inflate(layoutId, null);
TextView text_weather = (TextView)view.findViewById(R.id.text_weather);
text_weather.setTextSize(android.util.TypedValue.COMPLEX_UNIT_PX, 132);