Skip to content

Instantly share code, notes, and snippets.

View javonmcgilberry's full-sized avatar
😄

Javon McGilberry javonmcgilberry

😄
View GitHub Profile
#!/bin/bash
# this small scripts sets all the required environment variables for Synpress
# For Optimismtic Kovan
#
# It reads the private key from a file called SYNPRESS_PRIVATEKEY
# If you're a developer don't forget to put the file SYNPRESS_PRIVATEKEY in your .gitignore !
#
# Kwenta uses Synpress (a wrapper around Cypress) to run full end-to-end tests
# On Linux environment this scripts must be called using ". ./synpress-env.sh"
@ramantehlan
ramantehlan / README-Fancy.md
Last active April 27, 2026 14:47
README template I use for most of my projects.

Introduction

  • Add your project logo.
  • Write a short introduction to the project.
  • If you are using badges, add them here.

📒 Index

@Godofbrowser
Godofbrowser / axios.refresh_token.1.js
Last active April 7, 2026 13:19 — forked from culttm/axios.refresh_token.js
Axios interceptor for refresh token when you have multiple parallel requests. Demo implementation: https://github.com/Godofbrowser/axios-refresh-multiple-request
// for multiple requests
let isRefreshing = false;
let failedQueue = [];
const processQueue = (error, token = null) => {
failedQueue.forEach(prom => {
if (error) {
prom.reject(error);
} else {
prom.resolve(token);
@pieterdv
pieterdv / get-aad-token.js
Created May 30, 2018 12:01
Login through Azure AD with puppeteer
function getAadToken(user, password, identifier) {
return puppeteer.launch({ headless: true }).then(async browser => {
try {
const page = await browser.newPage();
await page.goto("SITEURL");
await page.click(
"LOGINBUTTON"
);
@CoralSilver
CoralSilver / Typography.md
Last active March 30, 2026 05:08
React Typography Component

Typography

The Typography component can be used to render most html text elements.

import Typography from 'react-toolbox/lib/typography';

const TypographyTest = () => (
 
@etienne-dldc
etienne-dldc / combineContext.js
Created March 28, 2018 18:38
A small function to combine react Contexts.
import React from 'react';
function onlyChild(children) {
return Array.isArray(children) ? children[0] : children;
}
export function combineContext(contexts) {
class Provider extends React.Component {
render() {
const init = this.props.children;
@Vinorcola
Vinorcola / Child.jsx
Created December 26, 2015 19:56
React - Change children props recursively
'use strict'
var React = require('react')
var Child = React.createClass({
render: function()
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 6, 2026 15:19
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@kottenator
kottenator / simple-pagination.js
Created July 13, 2015 20:44
Simple pagination algorithm
// Implementation in ES6
function pagination(c, m) {
var current = c,
last = m,
delta = 2,
left = current - delta,
right = current + delta + 1,
range = [],
rangeWithDots = [],
l;