Skip to content

Instantly share code, notes, and snippets.

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

Irving Armenta IrvingArmenta

🏠
Working from home
  • Yokohama, Kanagawa, Japan.
View GitHub Profile
@Almenon
Almenon / throttle.ts
Created March 11, 2018 04:29
typescript throttling / ratelimiting
/**
* class for limiting the rate of function calls.
* Thanks to Pat Migliaccio.
* see https://medium.com/@pat_migliaccio/rate-limiting-throttling-consecutive-function-calls-with-queues-4c9de7106acc
* @example let l = new limit(); let logMessageLimited = l.throttleAndQueue(msg => { console.log(msg); }, 500);
*/
class limit{
public callQueue = []
/**
@gijun19
gijun19 / AnimatedRoutes.js
Created February 18, 2018 01:39
AnimeJS with React Transition Group
import React, { Component } from 'react';
import { withRouter, Switch } from 'react-router-dom';
import { TransitionGroup, Transition } from 'react-transition-group';
import anime from 'animejs';
import TransitionElements from './TransitionElements';
class AnimatedRoutes extends Component {
state = {
location: this.props.location,
transitioning: true,
@Jonalogy
Jonalogy / handling_multiple_github_accounts.md
Last active May 13, 2024 12:21
Handling Multiple Github Accounts on MacOS

Handling Multiple Github Accounts on MacOS

The only way I've succeeded so far is to employ SSH.

Assuming you are new to this like me, first I'd like to share with you that your Mac has a SSH config file in a .ssh directory. The config file is where you draw relations of your SSH keys to each GitHub (or Bitbucket) account, and all your SSH keys generated are saved into .ssh directory by default. You can navigate to it by running cd ~/.ssh within your terminal, open the config file with any editor, and it should look something like this:

Host *
 AddKeysToAgent yes

> UseKeyChain yes

@belohlavek
belohlavek / gh-pages-deploy.md
Last active August 21, 2022 19:33 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. Here's how to do it:

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore (or skip and force-add afterwards).