Skip to content

Instantly share code, notes, and snippets.

zmarffy / cda.applescript
Created November 8, 2020 20:06
Change Date Added field for a track in macOS Catalina's Music library
set d to text returned of (display dialog "Enter a date in %m%d%Y format (example: 01122020 for January 12, 2020)" default answer "" buttons {"Cancel", "Continue"} default button "Continue")
set trackFileList to {}
tell application "Music"
repeat with t in selection
set trackInfo to {}
copy POSIX path of (get location of t) to the end of trackInfo
copy (get played count of t) to the end of trackInfo
copy trackInfo to the end of trackFileList
end repeat
rauchg /
Last active January 6, 2024 07:19
soheilhy /
Last active May 16, 2024 08:59
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for,, and on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

netpoetica / Setting up Nginx on Your Local
Last active May 28, 2024 15:01
Setting up Nginx on Your Local System

#Setting up Nginx on Your Local System ###by Keith Rosenberg

##Step 1 - Homebrew The first thing to do, if you're on a Mac, is to install homebrew from

The command to type into terminal to install homebrew is:

ruby -e "$(curl -fsSL"
febuiles /
Last active July 1, 2022 03:45
Fetching lyrics in Unix

Fetching lyrics in the command line

Objective: Print the lyrics for the current playing song.

How: We'll create a small bash script to do the fetching for us (using curl) and then we'll display it either in the terminal or in our $EDITOR

Get the current song

First we'll need to get the name of the current song and its artist: