Skip to content

Instantly share code, notes, and snippets.

View micjamking's full-sized avatar
🏝️
Working remote

Mike King micjamking

🏝️
Working remote
View GitHub Profile
@JofArnold
JofArnold / BoredApeYachtClub.sol
Last active April 9, 2023 12:44
The Bored Ape Yacht Club (BAYC) Solidity Smart Contract GitHub
/**
*Submitted for verification at Etherscan.io on 2021-04-22
*/
// File: @openzeppelin/contracts/utils/Context.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
@Zoramite
Zoramite / cleanup_branches.sh
Created November 1, 2017 20:40
Remove merged branches in git.
# Removes all the merged branches, ignoring master and staging branches.
git branch --merged | grep -vE '^\*|master$|staging$' | xargs -I % git branch -d %
@micjamking
micjamking / delayPromise.js
Last active July 14, 2020 03:16
Chaining delays in JavaScript (setTimeout) using Promises (ie. delay(func1, 1000).delay(func2, 1000).delay(func3, 1000))
/**
* Daisy chaining delays (setTimeout) using Promises
*
* Ex: delay(func1, 1000).delay(func2, 1000).delay(func3, 1000);
*
* @param {Function} cb - Callback function
* @param {Number} ms - Time delay (in milliseconds)
* @return chainable delay Promise (ie. delay(cb, ms).delay(cb, ms).delay(cb, ms)...)
*
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#Creating_a_Promise_around_an_old_callback_API
@nenadom
nenadom / README.md
Last active November 27, 2023 09:28
Download Google Play Store badges
import { Injectable } from '@angular/core';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
export interface AlertConfig {
description?: string;
okButtonLabel?: string;
cancelButtonLabel?: string;
okCallback?: Function;
displayLoading?: boolean;
@btroncone
btroncone / ngrxintro.md
Last active June 26, 2024 08:27
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

Comprehensive Introduction to @ngrx/store

By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

@paulirish
paulirish / what-forces-layout.md
Last active July 24, 2024 14:23
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@mzipay
mzipay / jsonp-proxy-request-interceptor.js
Last active May 19, 2021 09:34
AngularJS HTTP interceptor to work around CORS/JSONP problems
/**
* @license CC0 1.0 (http://creativecommons.org/publicdomain/zero/1.0/)
*
* The problem:
* You need to make a cross-domain request for JSON data, but the remote
* server doesn't send the necessary CORS headers, and it only supports
* simple JSON-over-HTTP GET requests (no JSONP support).
*
* One possible solution:
* Use 'jsonp-proxy-request-interceptor' to proxy the request through
@micjamking
micjamking / README.md
Last active August 29, 2015 14:16
2015 Computer Setup for Front end Development (OSX)
@staltz
staltz / introrx.md
Last active July 25, 2024 03:38
The introduction to Reactive Programming you've been missing