/Applications/Spotify.app/Contents/Resources/Spotify.sdef
# read-only
osascript -e 'tell application "Spotify" to player state' # stopped,playing,paused
osascript -e 'tell application "Spotify" to current track' # The current playing track.
osascript -e 'tell application "Spotify" to artwork url of current track' # Image data in TIFF format.
osascript -e 'tell application "Spotify" to artist of current track' # The artist of the track.
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
// | |
// CDView.swift | |
// CD | |
// | |
// Created by Daniel Kuntz on 7/3/23. | |
// | |
import SwiftUI | |
struct ShapeWithHole: Shape { |
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
import crypto from "crypto"; | |
import { listAllSubscriptions } from "lemonsqueezy.ts"; | |
import { NextRequest } from "next/server"; | |
// Put this in your billing lib and just import the type instead | |
type LemonsqueezySubscription = Awaited<ReturnType<typeof listAllSubscriptions>>["data"][number]; | |
const isError = (error: unknown): error is Error => { | |
return error instanceof Error; | |
}; |
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 domains = [ | |
"gmail.com", | |
"yahoo.com", | |
"hotmail.com", | |
"aol.com", | |
"hotmail.co.uk", | |
"hotmail.fr", | |
"msn.com", | |
"yahoo.fr", | |
"wanadoo.fr", |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<!-- not sure which one it is, so set both --> | |
<key>Ensemble</key> | |
<dict> | |
<key>Enabled</key> | |
<true/> | |
</dict> |
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 | |
/** | |
* By default, cURL sends the "Expect" header all the time which severely impacts | |
* performance. Instead, we'll send it if the body is larger than 1 mb like | |
* Guzzle does. | |
*/ | |
function add_expect_header(array $arguments) | |
{ | |
$arguments['headers']['expect'] = ''; |
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 | |
namespace heyjones\userpass; | |
add_action( 'rest_api_init', __NAMESPACE__ . '\\rest_api_init' ); | |
function rest_api_init() { | |
register_rest_route( | |
'heyjones', |
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 | |
/** | |
* Copyright 2019 Inpsyde GmbH | |
* | |
* @license MIT https://opensource.org/licenses/MIT | |
* | |
* 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 | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
Install terminal-notifier
via homebrew: https://github.com/julienXX/terminal-notifier
If using zsh, create an alias:
alias -g holler="echo 'holler' | terminal-notifier -sound default"
Store it in ./zshrc
if you're happy with it!
Now you can run
bundle exec rspec ; holler
and it will make a notification that says "holler" when your tests are done.
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/sh | |
if [ "$#" -ne 1 ] | |
then | |
echo "Usage: Must supply a domain" | |
exit 1 | |
fi | |
DOMAIN=$1 |
NewerOlder