sudo apt update && sudo apt upgrade
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/bash | |
set -e | |
# Fetch latest version information from API | |
API_RESPONSE=$(curl -s "https://www.cursor.com/api/download?platform=linux-x64&releaseTrack=stable") | |
DOWNLOAD_URL=$(echo "$API_RESPONSE" | grep -oP '(?<="downloadUrl":")[^"]*') | |
VERSION=$(echo "$API_RESPONSE" | grep -oP '(?<="version":")[^"]*') | |
if [ -z "$DOWNLOAD_URL" ] || [ -z "$VERSION" ]; then | |
echo "Failed to retrieve download URL or version. Exiting." |
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
class ActionCarousel(Action): | |
def name(self) -> Text: | |
return "action_carousels" | |
def run(self, dispatcher, tracker: Tracker, domain: "DomainDict") -> List[Dict[Text, Any]]: | |
message = { | |
"type": "template", | |
"payload": { | |
"template_type": "generic", | |
"elements": [ |
Ruby's regular expressions are unusually powerful. Postgres' regular expressions are not as powerful, but they come close; close enough that it's possible to do many pattern-based queries and string transformations entirely in a query.
And sometimes, it's very useful to have a single regular expression that works
-
How to use discipline, consistency and code organization to make your code grow more gently.
-
As you cycle through patterns, your application is becoming a patchwork of different coding techniques.
All those new techniques actually help, or if you are just adding layers of inderection.
-
Large applications are large so what we can do is organize a codebase in a way that "scales logarithmically".