You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Instantly share code, notes, and snippets.
Evan Relf
evanrelf
Passionate about pragmatic, rigorous software craftsmanship. Working on ACH and checks at Mercury.
AppleScript to slowly lower Spotify volume when you're not working, to incentivize being more productive! 🧠
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
# An AppleScript script that decreases Spotify volume while you're not using work related apps and websites.
# by Samuel Mortenson
# To install, download this script and open it in Script Editor, then select File > Export and export the script as an Application with "Stay open after run handler" checked. Now you can run the exported Application and GET BACK TO WORK!
# You shouldn't normally run random AppleScript or give it permissions, so uh read the code first before doing something dumb.
# Other notes:
# - Volume is only changed when a song is playing
# - Volume does not change while Spotify is open, to stay neutral about whether or not that is work related
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
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
Very simple and stupid chrome extension to block arbitrary sites
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
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
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
THIS GIST IS OUT OF DATE! Please use my new project template here to get started with Zig on Playdate:
https://github.com/DanB91/Zig-Playdate-Template
The rest of this is preservied for historical reasons:
This is a small snippet of some code to get you started for developing for the Playdate on Zig. This code should be used as a starting point and may not compile without some massaging. This code has only been tested out on macOS and you'll need to modify the addSharedLibrary() portion of build.zig to output a .dll or .so instead of a .dylib, depending on you platform.
This code will help you produce both an executable for the Playdate simulator and also an executable that actually run on the Playdate hardware.
Sorted by location-ish. I tried to reduce the list to places I think are good for visitors vs. my absolute favorites, but I put a section at the bottom for places that may not be for everyone.
Breakfast / Brunch
Toki Restaurant (Downtown)
580 SW 12th Ave
My order: Grilled mackerel breakfast with a bloody mary. Their Dalgona coffee is quite good too.
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
I wanted to share something I've learned in the course of therapy that I felt
might benefit others. Specifically, I'd like to share how to better listen to
one's emotions.
Why should we do this?
You might wonder why would we want to be in better touch with our emotions. One
reason why is that everybody builds a metaphor or narrative for themselves
Survey of invertible syntax description libraries for Haskell.
Invertible syntax descriptions
An "invertible syntax description" is something that can be used to both parse and generate a syntax.
For example, instead of defining separate toJson and fromJson functions for a given data type, an invertible syntax description could be used to provide both.
There are many Haskell libraries that provide this functionality or something close to it.
As far as I can tell most of them are at least inspired by Invertible syntax descriptions by Tillmann Rendel and Klaus Ostermann.
Personally I am interested in using these for HTTP routing.
I frequently want to be able to define a route such as /episodes/:id.json, dispatch based on that route, and generate links to that route.
Doing so manually is tedious and error prone.