Skip to content

Instantly share code, notes, and snippets.

@hhs671
hhs671 / A3_Calculator
Last active September 25, 2025 12:47
A3 Print Calculator
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Sticker Sheet Calculator</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style>
:root{
--bg:#0f172a; --card:#111827; --muted:#6b7280; --text:#e5e7eb; --accent:#4f46e5; --ok:#10b981; --warn:#f59e0b;
--radius:16px;
@hhs671
hhs671 / Send Whatsapp in Array
Created July 8, 2025 10:04
Send Whatsapp Array
function sendCustomWA() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName("Custom Whatsapp");
var backend = ss.getSheetByName("APIBackend");
var wappKeyID = backend.getRange('B2').getValue();
var wappInstID = backend.getRange('B1').getValue();
var part1 = backend.getRange('B3').getValue();
var part2 = backend.getRange('B4').getValue();
var part3 = backend.getRange('B5').getValue();
@hhs671
hhs671 / URLshortner
Created July 3, 2025 10:04
URLshortner
function shortenSelectedURL_TinyURL() {
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
var cell = sheet.getActiveCell();
var longUrl = cell.getValue();
// Basic validation
if (typeof longUrl !== "string" || !longUrl.startsWith("http")) {
SpreadsheetApp.getUi().alert("Please select a cell that contains a valid URL.");
return;
}
@hhs671
hhs671 / Menu
Last active July 3, 2025 09:39
Add Menu Item
function onOpen() {
SpreadsheetApp.getUi()
.createMenu('Invoice & Challan Tools')
.addItem('Save BOM Invoice', 'duplicateAndRenameBOMInvoice')
.addItem('Save BOM Challan', 'duplicateAndRenameBOMChallan')
.addSeparator()
.addItem('Save OUT Invoice', 'duplicateAndRenameOUTInvoice')
.addItem('Save OUT Challan', 'duplicateAndRenameOUTChallan')
.addToUi();
}
@hhs671
hhs671 / Index
Created June 25, 2025 03:48
Google sheets Scripts
function onOpen() {
var ui = SpreadsheetApp.getUi();
ui.createMenu('Index Menu')
.addItem('Create Index', 'createIndex')