All examples suitable for Mac or Ubuntu OS.
Finally, I will show 1-line cron command with use of curl.
You will use unix terminal.
- Telegram bot token (e.g. https://www.siteguarding.com/en/how-to-get-telegram-bot-api-token)
# .cursorrules | |
Components & Naming | |
- Use functional components with `"use client"` if needed. | |
- Name in PascalCase under `src/components/`. | |
- Keep them small, typed with interfaces. | |
- Use Tailwind for common UI components like textarea, button, etc. Never use radix or shadcn. | |
Prisma |
# Create script | |
cat << 'EOT' > load-dump-redis.py | |
import redisdl | |
#json_text = '...' | |
#redisdl.loads(json_text) | |
with open('dump.json') as f: | |
# streams data if ijson or jsaone are installed | |
redisdl.load(f, host="redis") |
# Create simple dump script | |
cat << 'EOT' > dump-redis.py | |
import redisdl | |
#json_text = redisdl.dumps() | |
with open('dump.json', 'w') as f: | |
# streams data | |
redisdl.dump(f, host="redis") | |
EOT |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Examples</title> | |
<script defer src="{% static 'web/js/deliveryCalculator.js' %}?debug={% now "U" %}" type="text/javascript"></script> | |
</head> | |
<body> | |
Hello world | |
</body> | |
</html> |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Simple Clock</title> | |
<script src="https://cdn.tailwindcss.com"></script> | |
<style> | |
@keyframes rotate { | |
100% { |
// Resolve 2 TODOs and use multicall batch client. | |
import type { Interface, Result, ethers } from "ethers"; | |
import { type IMulticall3 } from "../../index.js"; // TODO: use your import (in this example I used typechain types with multicall3 contract) | |
export type Multicall3ContractCall = { target: string, allowFailure: boolean, callData: string }; | |
export type Aggregate3Response = { success: boolean; returnData: string }; | |
export type TxResultsConverter<T> = (result: Result, ...opt: any[]) => T; | |
/* | |
* @description Client to be inherited from to work with Multicall3 contract to perform batch calls. |
All examples suitable for Mac or Ubuntu OS.
Finally, I will show 1-line cron command with use of curl.
You will use unix terminal.
import os | |
from tqdm import tqdm | |
SUPPORTED_FORMATS = ['py'] | |
directory = './src' | |
output_file = 'out.txt' | |
""" | |
I want to compare image (google to tg) and save tg edition in result folder | |
My case: | |
- google saved my photos (that I want to save) with ugly quality | |
- More of these photos are from telegram | |
- On my humble opinion in telegram quality of the photos is better | |
- What if I can go through google photos and try to replcace the ones with telegram one? | |
""" | |
import cv2 |
base_path = '/Users/User/Documents' | |
files = [ | |
os.path.join(dirpath, file) for (dirpath, subdirs, files) in os.walk(base_path) for file in files | |
if file.rsplit('.', 1)[-1].lower() in ['js'] | |
] |