Skip to content

Instantly share code, notes, and snippets.

View adriancmiranda's full-sized avatar
🌱
Today, what did you do for you tomorrow?

Adrian Miranda adriancmiranda

🌱
Today, what did you do for you tomorrow?
View GitHub Profile
@adriancmiranda
adriancmiranda / GitCommitEmoji.md
Created May 13, 2020 04:23 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
@adriancmiranda
adriancmiranda / range.js
Last active April 25, 2020 14:52
The range type represents a sequence of numbers and is commonly used for looping a specific number of times in for loops.
export function range(start, stop, step = 1, circularFill = false, map = (value) => value) {
if (typeof stop === 'undefined') {
stop = start;
start = 0;
}
if (step > 0 && start >= stop) {
step = -step;
}
define(function (require, exports, module) {
/**
*
* simple stagger function
*
* TODO: add option for a timing function... will require changing @arg interval to duration
*
* */
return function (targets, interval, action, delay) {
@adriancmiranda
adriancmiranda / flipping-birthstones-codevember.markdown
Created April 12, 2020 14:12
Flipping Birthstones #Codevember

Flipping Birthstones #Codevember

Codevember day 4: sapphire! Uses the Web Animations API, so if it doesn't work in your browser, that's why.

Click anywhere to see the effect.

A Pen by Adrian C Miranda on CodePen.

License.

@adriancmiranda
adriancmiranda / Dockerfile
Created April 8, 2020 16:23 — forked from eschwartz/Dockerfile
npm install from private repo, in docker build
# Add these lines to your dockerfile, before `npm install`
# Copy the bitbucket private key to your docker image
COPY ./bitbucket_ssh_key /opt/my-app
# Copy the ssh script to your docker image
COPY ./ssh-bitbucket.sh /opt/my-app
# Tell git to use your `ssh-bitbucket.sh` script
ENV GIT_SSH="/opt/map-project-tile-server/ssh-bitbucket.sh"
@adriancmiranda
adriancmiranda / generate-ssh-key.sh
Created April 8, 2020 15:09 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/mozilla_rsa
@adriancmiranda
adriancmiranda / pixibackground.js
Created April 2, 2020 14:43 — forked from only-cliches/pixibackground.js
PixiJS Background Cover & Background Container
/*
* PixiJS Background Cover/Contain Script
* Returns object
* . {
* container: PixiJS Container
* . doResize: Resize callback
* }
* ARGS:
* bgSize: Object with x and y representing the width and height of background. Example: {x:1280,y:720}
* inputSprite: Pixi Sprite containing a loaded image or other asset. Make sure you preload assets into this sprite.
@adriancmiranda
adriancmiranda / images-gallery-using-pixijs-and-webgl.markdown
Created March 31, 2020 03:32
Images Gallery using PixiJS and WebGL