Skip to content

Instantly share code, notes, and snippets.

View djirdehh's full-sized avatar
🏃‍♂️
runnin through the six

Hassan Djirdeh djirdehh

🏃‍♂️
runnin through the six
View GitHub Profile
@djirdehh
djirdehh / Form.js
Created March 9, 2023 00:43
Code example used for the KendoReact article: React Basics: React Forms Examples
import React, { useState } from 'react';
export function Form() {
const [formData, setFormData] = useState({
username: '',
password: '',
errors: [],
loading: false,
});
@djirdehh
djirdehh / index.js
Created March 3, 2023 02:10
Index file of code samples used in the following article: An Introduction to the KendoReact Card Component
import React from "react";
import ReactDOM from "react-dom/client";
import { Skeleton } from "@progress/kendo-react-indicators";
import {
Avatar,
Card,
CardTitle,
CardSubtitle,
CardHeader,
CardImage,
@djirdehh
djirdehh / index.js
Created January 26, 2023 01:26
Index file of code sample used in the following article: Building loading screens with KendoReact’s Skeleton component
import React from "react";
import ReactDOM from "react-dom/client";
import { Skeleton } from "@progress/kendo-react-indicators";
import {
Avatar,
Card,
CardTitle,
CardSubtitle,
CardHeader,
CardImage,
@djirdehh
djirdehh / index.js
Created January 15, 2023 18:06
Example of sorting and row selecting with React Table
import React from "react";
import { useTable, useSortBy, useRowSelect } from "react-table";
function App() {
const columns = React.useMemo(
() => [
{
Header: "Name",
accessor: "name"
},
@djirdehh
djirdehh / index.js
Last active January 1, 2023 17:56
Index file of code sample used in the following article: An introduction to the KendoReact Map component
import React from "react";
import ReactDOM from "react-dom/client";
import {
Map,
MapLayers,
MapTileLayer,
MapMarkerLayer,
MapBubbleLayer,
} from "@progress/kendo-react-map";
import "./index.scss";
@djirdehh
djirdehh / listingBookings.ts
Last active October 5, 2022 17:13
Mock listingBookings object as used in lesson 7.4 of Part II of the TinyHouse Fullstack React Masterclass.
const listingBookings = {
total: 4,
result: [
{
id: "5daa530eefc64b001767247c",
tenant: {
id: "117422637055829818290",
name: "User X",
avatar:
"https://lh3.googleusercontent.com/a-/AAuE7mBL9NpzsFA6mGSC8xIIJfeK4oTeOJpYvL-gAyaB=s100",
@djirdehh
djirdehh / listings.ts
Created December 20, 2019 20:23
Mock listings data used in lesson 3.3 of the TinyHouse Masterclass - Part II
const listings: Listing[] = [
{
_id: new ObjectId("5d378db94e84753160e08b30"),
title: "Clean and fully furnished apartment. 5 min away from CN Tower",
description:
"2 bed, 2 bathroom cozy apartment in the heart of downtown Toronto and only 5 min away from the CN Tower, Scotiabank Arena, and Rogers Center.",
image:
"https://res.cloudinary.com/tiny-house/image/upload/v1560641352/mock/Toronto/toronto-listing-1_exv0tf.jpg",
host: "5d378db94e84753160e08b57",
type: ListingType.Apartment,
@djirdehh
djirdehh / users.ts
Created December 20, 2019 20:24
Mock users data used in lesson 3.3 of the TinyHouse Masterclass - Part II
const users: User[] = [
{
_id: "5d378db94e84753160e08b55",
token: "token_************",
name: "James J.",
avatar:
"https://res.cloudinary.com/tiny-house/image/upload/w_1000,ar_1:1,c_fill,g_auto/v1560648533/mock/users/user-profile-1_mawp12.jpg",
contact: "james@tinyhouse.com",
walletId: "acct_************",
income: 723796,
@djirdehh
djirdehh / Parent+Child_Components.vue
Last active April 21, 2022 18:05
Example of passing props in Vue
<!-- Parent Component -->
<template>
<div>
<ChildComponent :numbers="numbers" />
</div>
</template>
<script>
import ChildComponent from './child-component.js';
export default {
name: 'ParentComponent',
// ==UserScript==
// @name Override Instacart Ads Manager flippers
// @namespace https://ads.instacart.com/
// @version 0.6
// @updateURL https://gist.githubusercontent.com/jiang925/94b31524a7f38d32000c20797f1d53db/raw/override-flippers.user.js
// @downloadURL https://gist.githubusercontent.com/jiang925/94b31524a7f38d32000c20797f1d53db/raw/override-flippers.user.js
// @description Override Instacart Ads Manager flippers from UI. Note that this only affects pure UI flippers. This does not affects the flippers on the backend.
// @author Tian Jiang
// @include *://*.instacart.com/*
// @include *://*-web-ads-stg.instacart.team/*