Skip to content

Instantly share code, notes, and snippets.

View ashrafali46's full-sized avatar

M.A.ASHARAF ALI ashrafali46

View GitHub Profile
@ashrafali46
ashrafali46 / Code.gs
Created March 31, 2025 12:35 — forked from bpwebs/Code.gs
Visualize Google Sheets Data in HTML Charts - Create a Dashboard
/**
* Visualize Google Sheets Data in HTML Charts
* By: bpwebs.com
* Post URL: https://www.bpwebs.com/visualize-google-sheets-data-in-html-charts
*/
function doGet() {
let template = HtmlService.createTemplateFromFile('Index');
let html = template.evaluate().setTitle('Data Visualization Web App');
@ashrafali46
ashrafali46 / convertSheet2Json.gs
Created November 16, 2024 12:45 — forked from daichan4649/convertSheet2Json.gs
[GAS] load SpreadSheet as JSON #spreadsheet #calendar #google
function convertSheet2Json(sheet) {
// first line(title)
var firstRange = sheet.getRange(1, 1, 1, sheet.getLastColumn());
var firstRowValues = firstRange.getValues();
var titleColumns = firstRowValues[0];
// after the second line(data)
var lastRow = sheet.getLastRow();
var rowValues = [];
for(var rowIndex=2; rowIndex<=lastRow; rowIndex++) {
@ashrafali46
ashrafali46 / convertSheet2Json.gs
Created November 16, 2024 12:41 — forked from jrichardsz/convertSheet2Json.gs
spreadsheet as json api using Google Apps Script
/* Source: https://gist.github.com/daichan4649/8877801 */
function doGet(e) {
//tab name in sheet
var sheetName = "Sheet 1";
//key in url of document
var sheetId = "1234...";
var book = SpreadsheetApp.openById(sheetId);
var sheet = book.getSheetByName(sheetName);
@ashrafali46
ashrafali46 / CRUD credit Bpwebs code.gs
Created November 9, 2024 12:01 — forked from krooluang/CRUD credit Bpwebs code.gs
CRUD Bpwebs DataTable Style
//code.gs
/**
* Creating a Google Sheets Data Entry Form for CRUD Operations
* By: bpwebs.com
* Post URL: https://www.bpwebs.com/crud-operations-on-google-sheets-with-online-forms
* Dev Examblog : https://examblog64.krooluang.com
*/
//CONSTANTS
const SPREADSHEETID = "xxx";
@ashrafali46
ashrafali46 / index.html
Created July 2, 2024 11:46 — forked from prof3ssorSt3v3/index.html
Code for Video about Monitoring Download Progress and displaying it with SVG animations
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>SVG Progress Display for File Downloads</title>
<style>
:root {
--bgcolor: hsl(220, 20%, 70%);
--focuscolor: hsl(220, 80%, 50%);
@ashrafali46
ashrafali46 / app.js
Created July 2, 2024 11:44 — forked from prof3ssorSt3v3/app.js
Using History.state and popstate to manage calls.
const APP = {
init: () => {
console.log('init');
document.querySelector('footer').innerHTML = `<p>popstate with ${JSON.stringify(history.state)}</p>`;
if (!history.state) {
console.log('clear url');
history.replaceState(null, null, './index.html'); //default value
} else {
APP.readState();
}
@ashrafali46
ashrafali46 / canvas-intro.html
Created July 2, 2024 11:43 — forked from Fabian295/canvas-intro.html
hTML5 Canvas introduction with the basics and set up, shapes making, etc
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>HTML5 Canvas Basics and Shapes</title>
<style>
*{
padding: 0;
margin: 0;
box-sizing: border-box;
// SASS Built-in Functions
$clr1: hsla(123, 50%, 50%, 0.9);
$clr2: #934599;
$alpha: alpha($clr1);
$h: hue($clr1);
$s: saturation($clr2);
$l: lightness($clr2);
$red: red($clr1);
@ashrafali46
ashrafali46 / canvas-images.html
Created July 2, 2024 11:35 — forked from Fabian295/canvas-images.html
HTML5 Canvas - Learning and Working with the image object and creating and manipulating images on the canvas, etc.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Canvas Images</title>
<style>
#canvas{
border: 1px solid #999;
margin: 1rem auto;
display: block;
@ashrafali46
ashrafali46 / index.html
Created October 17, 2023 09:56
LS Todo List
<main>
<form id="form" autocomplete="off">
<p class="alert"></p>
<h3 class="title">Todo List</h3>
<div class="control">
<input type="text" id="entry" placeholder="e.g. some stuffs">
<button type="submit" class="btn submit-btn">Submit</button>
<button type="button" class="btn cancel-btn d-none">Cancel</button>
</div>
</form>