Skip to content

Instantly share code, notes, and snippets.

Living my best life

Bardia Rastin bardiarastin

Living my best life
Block or report user

Report or block bardiarastin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
bardiarastin / useApi.js
Last active Jul 25, 2019
simple React custom hook for api access
View useApi.js
import { useState, useEffect } from 'react'
import { PersonsApi } from '../Api/PersonsApi'
const ApiNameMapper = {
const useApi = (apiName, apiMethod, initialData = null) => {
const [response, setResponse] = useState(null)
View proxy.js
const ProxyChain = require('proxy-chain');
const server = new ProxyChain.Server({
port: 8000,
verbose: false,
prepareRequestFunction: ({ request, username, password, hostname, port, isHttp }) => {
return {
requestAuthentication: username !== 'myusername' || password !== 'mypassword'
bardiarastin / cloudSettings
Last active Dec 17, 2017
Visual Studio Code Settings Sync Gist
View cloudSettings
You can’t perform that action at this time.