Skip to content

Instantly share code, notes, and snippets.

View i-am-chitti's full-sized avatar

Deepak Kumar i-am-chitti

  • rtCamp
View GitHub Profile
@i-am-chitti
i-am-chitti / type
Created February 6, 2024 17:36
Typescript type
export type Event = {
[key: string]: string | undefined | number | null | boolean | object;
id: number;
site_id: number;
date: number;
user: {
user_id: string;
visitor_profile?: {
email: string;
@i-am-chitti
i-am-chitti / export.php
Created April 21, 2023 20:29
Export Script with batch processing using WP_FileSystem, streaming and buffering
global $wp_filesystem;
// If not already set, initialize the WP filesystem.
if ( empty( $wp_filesystem ) ) {
require_once ABSPATH . '/wp-admin/includes/file.php';
WP_Filesystem();
}
$uploads_dir = wp_get_upload_dir()['basedir'] . '/movie-library/';
@i-am-chitti
i-am-chitti / Coordinate.js
Created June 12, 2021 21:19
Find Your Hat | Codecademy Javascript III Project
// class to handle coordinates
class Coordinate {
constructor(X, Y) {
this._X = X;
this._Y = Y;
}
print() {
console.log(`(${this._X}, ${this._Y})`);
}