Skip to content

Instantly share code, notes, and snippets.

View imabp's full-sized avatar
💭
Learning By Doing

Abir imabp

💭
Learning By Doing
View GitHub Profile
@imabp
imabp / storyblok.ts
Created December 14, 2021 13:37
useStoryblok hook for Typescript developers. Implements the Declaration Merging and type support.
import StoryblokClient, { StoryData } from 'storyblok-js-client'
import { useState, useEffect } from 'react'
// Addition by Github: imabp:
// The following code implements Declaration merging which helps to fulfill the requirement for useStoryblok hook in a typesafe way.
declare global {
interface Window{
StoryblokBridge: FunctionConstructor
}
@imabp
imabp / storyblok.js
Created December 14, 2021 06:41
useStoryblok hook for development environment
import StoryblokClient from 'storyblok-js-client';
import { useState, useEffect } from 'react';
const Storyblok = new StoryblokClient({
accessToken: process.env.ACCESS_TOKEN,
cache:{
clear:'auto',
type:'memory'
}
})
@imabp
imabp / blog.js
Last active July 20, 2021 16:44
Integrate blogtraversy with your Portfolio
/*
Thanks for using blogtraversy.
Read this before using....
Please configure the following usernames variable, with your respective handles.
You can set a type at line:34, default type is 'all' which fetches all the blogs.
*/
import React, { useState } from "react";
import { getBlogs } from "blogtraversy";
// importing react bootstrap for quick css.
@imabp
imabp / desc.html
Created September 17, 2020 05:40
Hack The Mountains Description
<p>💻If you are beginner at web engineering, 🙋‍ NodeJS will definitely help you a lot in developing
web apps and designing server for your next upcoming 🚀 project!!
<br/>
In this session,we will be covering various aspects of NodeJS including</p><br/><br/>
<ol>
<li>Introduction and Why NodeJS</li>
<li>Architecture and Working of NodeJS </li>
<li>When not to use NodeJS </li>
<li>How to use Azure Portal to deploy your NodeJS web app in FEW CLICKS.</li>
<li>🎉 Bonus: Open Source Projects for beginners in this upcoming season of Hacktoberfest</li>