> yt-dlp -f "bestaudio/best" --extract-audio --audio-format m4a <you.tubeurl>
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 | |
use Doctrine\ORM\EntityManagerInterface; | |
use DoctrineBatchUtils\BatchProcessing\SimpleBatchIteratorAggregate; | |
class LargeFileProcessor | |
{ | |
private EntityManagerInterface $entityManager; | |
public function __construct(EntityManagerInterface $entityManager) |
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/bash | |
# config file looks like: | |
## ``` | |
# source=$PWD | |
# dest=/path/to/folder | |
### ``` | |
# Check if .rsync file exists | |
CONFIG_FILE=".rsync" | |
if [[ ! -f "$CONFIG_FILE" ]]; then |
To fetch todos from a Notion database list using the Notion API, you'll need to follow these steps:
- Create a Notion integration to get an API key
- Share your database with the integration
- Use the "Query a database" endpoint to fetch the list of tasks
Here's a step-by-step guide with code examples:
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 | |
use Illuminate\Support\Facades\Cache; | |
use Illuminate\Support\Facades\File; | |
use Illuminate\Support\Str; | |
use Illuminate\Support\Facades\Config; | |
// get data from an api that uses basic auth then decode it as a .env file | |
function get_features($url, $creds, $segment = []) { | |
$ch = curl_init($url); | |
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/xml', $additionalHeaders)); |
To show only running containers use the given command:
docker ps
To show all containers use the given command:
docker ps -a
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
body { | |
font: 22px/1.6 system-ui,sans-serif; | |
margin: auto; | |
max-width: 35em; | |
padding: 0 1em; | |
} | |
img, video { | |
max-width: 100%; | |
height: auto; |
Note: From ChatGPT. Thank you ChatGPT!
To implement click tracking with jQuery and store it in a backend API, we can outline the following steps:
You can use a database table to store unique clicks, capturing the necessary details like the browser
, IP address
, and clicked_at
timestamp.
SQL for the table:
NewerOlder