Skip to content

Instantly share code, notes, and snippets.

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

Vishwajeet Raj vishwajeetraj11

🏠
Working from home
View GitHub Profile
@karpolan
karpolan / withSuspense.js
Created August 10, 2019 10:46
withSuspense() HOC for React.lazy() + React.Suspense
import React from 'react';
import { CircularProgress, LinearProgress } from '@material-ui/core/';
/**
* Wraps the React Component with React.Suspense and FallbackComponent while loading.
* @param {React.Component} WrappedComponent - lazy loading component to wrap.
* @param {React.Component} FallbackComponent - component to show while the WrappedComponent is loading.
*/
export const withSuspense = (WrappedComponent, FallbackComponent = null) => {
return class extends React.Component {
@daviddefco
daviddefco / full_linkedin_profile
Last active August 15, 2021 01:33
Code to get access to both basic and full linkedin profiles. You make one execution with the first code block to get token and token secret values and then can remove this code, assign values to variables and get the access_token directly
require 'oauth'
# api_key and api_secret values are got from the registration of your application in LinkedIn:
# http://developer.linkedin.com/
api_key = 'Your API Key'
api_secret = 'Your API Secret'
# access_token and token_secret are known after the first execution code block
access_token = 'The token we get below'
token_secret = 'The token secret we get below'