Skip to content

Instantly share code, notes, and snippets.

View naveenadi's full-sized avatar
🎯
Focusing

Aditya Agarwal naveenadi

🎯
Focusing
View GitHub Profile
@selivan
selivan / cf-update-all-zones-settings.sh
Last active May 4, 2025 21:16
Script to update some settings for all zones on a Cloudflare account. Default: disable TLS ECH(Encrypted Client Hello).
#!/bin/bash
ACCOUNT_EMAIL="$1"
GLOBAL_API_KEY="$2"
OPTION="${3:-ech}"
VALUE="${4:-off}"
if [ -z "${ACCOUNT_EMAIL}" ] || [ -z "${GLOBAL_API_KEY}" ]; then
echo "Usage: $0 CLOUDFLARE_ACCOUNT_EMAIL CLOUDFLARE_GLOBAL_API_KEY [OPTION] [VALUE]"
echo
@stenuto
stenuto / hls.sh
Created November 7, 2024 16:58
HLS ffmpeg script
#!/bin/bash
# Function to display usage information
usage() {
echo "Usage: $0 /path/to/input.mp4 [ /path/to/output_directory ]"
exit 1
}
# Check if at least one argument (input file) is provided
if [ $# -lt 1 ]; then
@bizz84
bizz84 / update-android-project.sh
Last active May 12, 2025 04:04
Script to update Gradle, Java and other Android project settings in a Flutter project
#!/bin/bash
# Update Gradle, Java and other Android project settings in a Flutter project
# Works with both .gradle and .gradle.kts build files
# See: https://gradle.org/releases/
# See: https://developer.android.com/build/releases/gradle-plugin#compatibility
DESIRED_GRADLE_VERSION="8.11.1"
# Build errors often show the required Java version
DESIRED_JAVA_VERSION="17"
# See: https://developer.android.com/ndk/downloads
@xSaCh
xSaCh / expandable_widget.dart
Created February 27, 2025 17:43
Flutter Widget allow child to grow / shrink based on userdrag. DragWidget's gesture will be prioritize that it's parents even if parent is scrollable like SingleChildScrollView.
import 'package:flutter/material.dart';
class ExpandableWidget extends StatefulWidget {
const ExpandableWidget({
super.key,
required this.child,
required this.dragWidget,
this.initHeight,
this.maxHeight,
this.minHeight,
@tanaikech
tanaikech / submit.md
Created March 15, 2025 06:33
Generate Images with Gemini API using Google Apps Script

Generate Images with Gemini API using Google Apps Script

Description

Recently, image generation was supported in the Gemini API using Gemini 2.0 Flash Experimental and Imagen 3. This report introduces simple sample scripts for generating images using the Gemini API with Google Apps Script. When images can be created using the Gemini API with Google Apps Script, Google Apps Script, which seamlessly integrates with Google Docs, Sheets, and Slides, becomes a powerful tool for creating and managing them, and the applications are infinite.

Usage

# Universal Guide to Building Model Context Protocol (MCP) Servers
This guide provides comprehensive instructions for building and connecting Model Context Protocol (MCP) servers to integrate any external API or service with large language models like Claude.
## What is an MCP?
The Model Context Protocol (MCP) is a standardized way for large language models (LLMs) like Claude to communicate with external tools and services. MCPs enable LLMs to:
- Access real-time data from APIs
- Control external services and systems

Writing Style Prompt

  • Focus on clarity: Make your message really easy to understand.
    • Example: "Please send the file by Monday."
  • Be direct and concise: Get to the point; remove unnecessary words.
    • Example: "We should meet tomorrow."
  • Use simple language: Write plainly with short sentences.
    • Example: "I need help with this issue."
  • Stay away from fluff: Avoid unnecessary adjectives and adverbs.
  • Example: "We finished the task."