Skip to content

Instantly share code, notes, and snippets.

View KartikWatts's full-sized avatar
🏠
Working from home

Kartik Arora KartikWatts

🏠
Working from home
View GitHub Profile
@KartikWatts
KartikWatts / BlogPostingCustomHTML.html
Last active May 5, 2023 13:01
Custom Html Script for `BlogPosting` type `Article` in Google structured data
<script>
(function(){
var schema=
{
"@context": "http://schema.org",
"@type": "BlogPosting",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": {{Page URL}}
},
@KartikWatts
KartikWatts / IH_Avaliable_Batches-API_Response.jsonc
Last active February 19, 2023 13:43
New API Response for /available-batches API endpoint
// API*******************************
// **********************************
// EndPoint: `/available-batches/{batchId}`
// RequestMethod: GET
// PayLoad: month={month}&year={year}
// **********************************
// Response**************************
// **********************************
CREATE TABLE TIMEDIMENSION(
SKDATE varchar(20) not null,
Date varchar(20) not null ,
CalendarDay int not null,
CalendarMonth int not null,
CalendarYear int not null,
CalendarQuarter int not null,
DayNameLong nvarchar(10) not null,
DayNameShort nvarchar(10) not null,
DayNumberOfWeek int not null,
@KartikWatts
KartikWatts / google_drive_api.php
Last active May 10, 2021 08:44
Google Drive V3 API access with PHP
<?php
// Gist for Stack OverFlow answer: https://stackoverflow.com/a/67467388/7610978
//THE API IS ACCESSED HERE USING *Service Account*, you may use other authentication ways as per requirements.
// For more clear reference to the parameters along with a description, this is really helpful: https://developers.google.com/drive/api/v3/reference/permissions#methods
namespace App\Http\Controllers;
use Google_Client;
use Google_Service_Drive;