/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 hidden or 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 hidden or 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 |
This file contains hidden or 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 puppeteer = require('puppeteer'); | |
| (async () => { | |
| const browser = await puppeteer.launch(); | |
| const page = await browser.newPage(); | |
| // Adjustments particular to this page to ensure we hit desktop breakpoint. | |
| page.setViewport({width: 1000, height: 600, deviceScaleFactor: 1}); | |
| await page.goto('https://www.chromestatus.com/samples', {waitUntil: 'networkidle'}); |
This file contains hidden or 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
| function waitForElement(selector) { | |
| return new Promise(function(resolve, reject) { | |
| var element = document.querySelector(selector); | |
| if(element) { | |
| resolve(element); | |
| return; | |
| } | |
| var observer = new MutationObserver(function(mutations) { |
Just playing around. It won't be bulletproof, but enough to do some basics.
A Pen by Aaron Barker on CodePen.
This file contains hidden or 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
| /** | |
| * Using Operator Mono in Atom | |
| * | |
| * 1. Open up Atom Preferences. | |
| * 2. Click the “Open Config Folder” button. | |
| * 3. In the new window’s tree view on the left you should see a file called “styles.less”. Open that up. | |
| * 4. Copy and paste the CSS below into that file. As long as you have Operator Mono SSm installed you should be golden! | |
| * 5. Tweak away. | |
| * | |
| * Theme from the screenshot (http://cdn.typography.com/assets/images/blog/operator_ide2.png): |
This file contains hidden or 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
| void function() { "use strict" | |
| /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WIP DO NOT USE WIP !!!!!!!!!!!!!!!!!!!!! | |
| DO NOT USE THIS YET. | |
| USE THE 2016 VERSION BELOW PLEASE. | |
| WWWWWWWW WWWWWWWWIIIIIIIIIIPPPPPPPPPPPPPPPPP | |
| W::::::W W::::::WI::::::::IP::::::::::::::::P | |
| W::::::W W::::::WI::::::::IP::::::PPPPPP:::::P |