Update from | Update to | Links |
---|---|---|
v10 | v11 | Article |
v11 | v12 | Article |
v12 | v13 | Article |
v13 | v14 | Article |
v14 | v15 | [Article](https://angular-material.dev/courses/m2-ng-components/m2-ng-components/upda |
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 default paths and URLs | |
DOWNLOADS_DIR="$HOME/Downloads" | |
APPLICATIONS_DIR="$HOME/.local/bin" # More appropriate location for AppImages | |
ICON_URL="https://www.cursor.com/apple-touch-icon.png" | |
APPIMAGE_URL="https://downloads.cursor.com/production/53b99ce608cba35127ae3a050c1738a959750865/linux/x64/Cursor-1.0.0-x86_64.AppImage" | |
ICON_FILENAME="cursor-icon.png" | |
APPIMAGE_FILENAME="Cursor-1.0.0-x86_64.AppImage" | |
DESKTOP_FILE="$HOME/.local/share/applications/cursor-editor.desktop" |
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
""" | |
Divar to Telegram Notifier Bot | |
This script monitors a filtered Divar page and sends newly posted items to a specified Telegram channel every 60 seconds. | |
Setup Instructions: | |
1. Create a Telegram bot using BotFather. | |
2. Add the bot to your Telegram group or channel. | |
3. Promote the bot as an admin in your channel so it can post messages. | |
4. Use @username_to_id_bot to get the numeric ID of your channel (e.g., -1001234567890). |
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
irping() { | |
ip=$1 | |
nodes=("ir1" "ir3" "ir5" "ir6") | |
for node in "${nodes[@]}"; do | |
# Make the API request and store the response | |
response=$(curl -s -H "Accept: application/json" "https://check-host.net/check-ping?host=${ip}&node=ir1.node.check-host.net&node=ir3.node.check-host.net&node=ir5.node.check-host.net&node=ir6.node.check-host.net") | |
# Check for "limit_exceeded" error in the response | |
error_message=$(echo "$response" | jq -r '.error') | |
if [ "$error_message" == "limit_exceeded" ]; then |
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 | |
VIDEOS=$(ls *.mp4) | |
for VIDEO in $VIDEOS | |
do | |
ffmpeg -i $VIDEO -vcodec libx265 -crf 28 -f mp4 ${VIDEO%%.*}_compressed.mp4 | |
done |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>My Angular from Scratch</title> | |
<style> | |
.my-component { | |
font-family: Arial, sans-serif; |
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
// Usage: | |
// Replace React.lazy(() => import('x')); | |
// with retryDynamicImport(() => import('x')); | |
import { ComponentType, lazy } from 'react'; | |
const MAX_RETRY_COUNT = 15; | |
const RETRY_DELAY_MS = 500; | |
// Regex to extract the module URL from the import statement |
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
function slowmo(rate = 10) { | |
window._raf = window.requestAnimationFrame | |
window.requestAnimationFrame = f => window._raf(t => f(t/rate)) | |
Date._now = Date.now | |
Date.now = () => Date._now() / rate | |
performance._now = performance.now | |
performance.now = () => performance._now()/rate | |
} | |
slowmo() |