Skip to content

Instantly share code, notes, and snippets.

View adyontech's full-sized avatar
😎
Working on private projects.

Aditya sharma adyontech

😎
Working on private projects.
View GitHub Profile
@Offirmo
Offirmo / javascript_learning_resources.md
Last active May 8, 2024 07:47
[Resources for learning JavaScript] #JavaScript
@luisrudge
luisrudge / Products.js
Created September 12, 2019 15:02
api hooks
const Products = () => {
const { loading, data: products, refetch } = useApiGET(`/products`);
const api = useApi();
if (loading) {
return <Loading />;
}
return (
<div>
{products.map(p => (
@adyontech
adyontech / beeocean.md
Last active August 20, 2018 04:12
Why do I call BeeOcean my all web dev coding knowledge source and outcome?

Why do I call BeeOcean my all web dev coding knowledge source and outcome?

Hello 😊 , thanks for finding time to navigate here. In the following Gist I will be bragging 😉 about my skills and all the cool concept I have applied to this project (BeeOcean.com, formerly proworktree.com).

If you are a non-dev person, I request you is to read through and grow your knowledge about web apps 💥, let's go a bit deeper by knowing how complex and cool it is to work on a website. 😍

I am sure after going through you won't say that a website creation is just putting some HTML-CSS together 😛...

Credits :- As a single developer in the project it would have been really difficult if this guy 👉 Rud156 had not picked up my calls for queries ( Many times ) .

Ok, Let's start now.

Business logic

This is a SaaS product, therefore there is a need to incorporate the f

@cereallarceny
cereallarceny / index.js
Last active May 2, 2023 06:41
Server-side rendering in Create React App
const md5File = require('md5-file');
const path = require('path');
// CSS styles will be imported on load and that complicates matters... ignore those bad boys!
const ignoreStyles = require('ignore-styles');
const register = ignoreStyles.default;
// We also want to ignore all image requests
// When running locally these will load from a standard import
// When running on the server, we want to load via their hashed version in the build folder
@znck
znck / promised.ts
Last active August 14, 2019 15:22
Moved to https://github.com/znck/promised | A utility to convert callbacks to promises.
import {promisify, CustomPromisify} from 'util'
export type FunctionProxy<T extends Function> = CustomPromisify<T>
export type PackageProxy<P extends { [key: string]: Function }> = {
[K in keyof P]: FunctionProxy<P[K]>
}
export function promised<T extends { [key: string]: Function | any }>(target: T): PackageProxy<T> {
@rhysburnie
rhysburnie / node-or-browser.js
Last active September 21, 2023 16:13
Detect node or browser
// determine if in-browser or using node.js
// thruthy
var _nodejs = (
typeof process !== 'undefined' && process.versions && process.versions.node);
if (_nodejs) {
_nodejs = {
version: process.versions.node
};
}
@jcouyang
jcouyang / README.org
Last active May 31, 2024 14:30
Promise All with Limit of Concurrent N

The Promise All Problem

in case of processing a very large array e.g. Promise.all(A_VERY_LARGE_ARRAY_OF_XHR_PROMISE)

which would probably blow you browser memory by trying to send all requests at the same time

solution is limit the concurrent of requests, and wrap promise in thunk

Promise.allConcurrent(2)([()=>fetch('BLAH1'), ()=>fetch('BLAH2'),...()=>fetch('BLAHN')])

@tilakpatidar
tilakpatidar / NLP Lab workshop 17th May 2016.md
Last active May 17, 2016 12:44
Resource links for the workshop conducted by NLP lab on 17th May 2016.

#Semantic Search engine – NLP lab

###17/05/2016 Task

http://blog.aiesec.in/

Use the above blog to scrap the following information and show in terminal (ubuntu) or in a file in windows.

@soderlind
soderlind / class-google-maps-oembed-provider.php
Last active April 29, 2024 11:44
WordPress Google Maps oEmbed Provider using the Google Maps Embed API
<?php
/**
* Create a Google Maps oEmbed Provider using the Google Maps Embed API
*
* @see https://developers.google.com/maps/documentation/embed/
* @link https://gist.github.com/soderlind/db6dae8a73253329bc97ac50d7ebedef
* @since 1.0.0
* @package Google_Maps_oEmbed_Provider
*/
class DSS_oEmbed_Add_Provider {
@vasanthk
vasanthk / System Design.md
Last active June 30, 2024 10:36
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?