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
const noble = require('@abandonware/noble'); | |
const address = ''; | |
const uuidPrimary = 'cba20d00224d11e69fb80002a5d5c51b'; | |
const uuidWrite = 'cba20002224d11e69fb80002a5d5c51b'; | |
noble.on('stateChange', state => { | |
if (state === 'poweredOn') { | |
noble.startScanning([uuidPrimary], false); | |
} else { |
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
PYTHON=/Users/dave/.asdf/shims/python3 | |
STATUS=`$PYTHON -m homekit.get_characteristic -f ~/.homekit_python/pairing.json -a iHaper -c 1.13` | |
if [[ "$STATUS" =~ "true" ]]; then | |
$PYTHON -m homekit.put_characteristic -f ~/.homekit_python/pairing.json -a iHaper -c 1.13 false | |
else | |
$PYTHON -m homekit.put_characteristic -f ~/.homekit_python/pairing.json -a iHaper -c 1.13 true | |
fi |
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
// clang -x objective-c -framework Foundation -framework MediaRemote -F /System/Library/PrivateFrameworks TouchBarMediaKeys.m -o TouchBarMediaKeys | |
// ./TouchBarMediaKeys | |
#import <Foundation/Foundation.h> | |
#import <MediaPlayer/MediaPlayer.h> | |
enum { | |
kMRPlaybackStateUnknown = 0, | |
kMRPlaybackStatePlaying, | |
kMRPlaybackStatePaused, |
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
enum { | |
kMRPlaybackStateUnknown = 0, | |
kMRPlaybackStatePlaying, | |
kMRPlaybackStatePaused, | |
kMRPlaybackStateStopped, | |
kMRPlaybackStateInterrupted | |
}; | |
typedef uint32_t MRPlaybackState; | |
typedef void (^MRMediaRemoteGetNowPlayingPlayerCompletion)(id playbackPlayer); |
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
// clang -framework DiskArbitration -framework Carbon disk.c -o disk | |
#include <Carbon/Carbon.h> | |
void printUUID() | |
{ | |
DADiskRef disk; | |
CFDictionaryRef descDict; | |
DASessionRef session = DASessionCreate(NULL); |
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
const fetchVideos = (channels, apiKey, lastHours) => { | |
return Promise.all( | |
channels.map(channel => { | |
const url = `https://www.googleapis.com/youtube/v3/search?key=${apiKey}&channelId=${channel}&part=snippet,id&order=date&maxResults=20`; | |
return fetch(url) | |
.then(response => response.json()) | |
.then(json => { | |
return json.items | |
.filter(item => item.id.kind === 'youtube#video') |
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
require 'uri' | |
cask "pixelsnap2" do | |
version "2.0" | |
sha256 "04e2d1892593d904f3d528c70b5fc4ec773c957b2d3bdd0e8a8876045ff458c8" | |
url "file://#{URI::encode(File.expand_path(File.dirname(ARGV[1] ? ARGV[1] : '')))}/PixelSnap-2-2.0.dmg" | |
name "PixelSnap 2" | |
homepage "https://getpixelsnap.com/" | |
app "PixelSnap 2.app" |
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
require 'uri' | |
cask 'airbuddy' do | |
version '1.0.4' | |
sha256 '793c396ecdf242a7b90433efa790c11b84209b6a9d621d5c1a68d201654b20cc' | |
url "file://#{URI.encode(File.expand_path(File.dirname(ARGV[1] || '')))}/S3KtOo0aHZ_AirBuddy_v1.0.4_18.zip" | |
name 'AirBuddy' | |
homepage 'https://gumroad.com/l/airbuddy' |
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
#!/usr/bin/env node | |
/* global Application */ | |
/* eslint-disable no-console */ | |
const fetch = require('node-fetch'); | |
const osa = require('osa2'); | |
require('array-flat-polyfill'); | |
const API_KEY = 'd1be89b2-08b8-4b93-9ebd-eeca6544bdbd'; |
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
#!/bin/bash | |
# npm install -g applesign ios-deploy | |
APPLE_TV=xxx | |
YOUTUBE_IPA="YouTube 1.2.1.ipa" | |
provision() { | |
cd ~/Library/MobileDevice/Provisioning\ Profiles |