See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope> is optional
| #!/bin/bash | |
| # if spotify is started | |
| if [ "$(pidof spotify)" ]; then | |
| # status can be: Playing, Paused or Stopped | |
| status=`dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'PlaybackStatus'|egrep -A 1 "string"|cut -b 26-|cut -d '"' -f 1|egrep -v ^$` | |
| artist=`dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata'|egrep -A 2 "artist"|egrep -v "artist"|egrep -v "array"|cut -b 27-|cut -d '"' -f 1|egrep -v ^$` | |
| album=`dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata'|egrep -A 1 "album"|egrep -v "album"|cut -b 44-|cut -d '"' -f 1|egrep -v ^$` | |
| title=`dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 o |
| #!/bin/bash | |
| set -e | |
| declare -x USERNAME="$1" | |
| declare -x USERPIC="$2" | |
| declare -r DSIMPORT_CMD="/usr/bin/dsimport" | |
| declare -r ID_CMD="/usr/bin/id" |
This is a simple Tailwind plugin to expose all of Tailwind's colors, including any custom ones, as custom css properties on the :root element.
There are a couple of main reasons this is helpful:
See the Tailwind Plugins for more info on plugins.
| import { preprocess } from 'svelte/compiler' | |
| /** | |
| * @typedef {import("svelte/types/compiler/preprocess").PreprocessorGroup} PreprocessorGroup | |
| * @param {PreprocessorGroup[]} preprocessors | |
| * @returns {PreprocessorGroup[]} | |
| */ | |
| export function sequence(preprocessors) { | |
| return preprocessors.map((preprocessor) => ({ | |
| markup({ content, filename }) { |
[This portion of call begins at 25:47]
Me: I could make it really easy on you, if you think Apollo is costing you $20 million per year, cut me a check for $10 million and we can both skip off into the sunset. Six months of use. We're good. That's mostly a joke.
Reddit: Six months of use? What do you mean? I know you said that was mostly a joke, but I want to take everything you're saying seriously just to make sure I'm not - what are you referring to?
Me: Okay, if Apollo's opportunity cost currently is $20 million dollars. At the 7 billion requests and API volume. If that's your yearly opportunity cost for Apollo, cut that in half, say for 6 months. Bob's your uncle.
Reddit: You cut out right at the end. I'm not asking you to repeat yourself for a third time, but you legit cut out right at the end. "If your opportunity cost is $10 million" and then I lost you.
This gist contains the full list of all scenes available in the scene gallery of the official hue app at the time of writing (2023-09-28)
The contents were collected in a tedious clean-room approach, setting a group of lights to a scene and then noting the different x,y values + its name.
Thanks a lot to @coderph0x who did most of the legwork!