Skip to content

Instantly share code, notes, and snippets.

View alxmal's full-sized avatar

Alexandr Malafeev alxmal

View GitHub Profile
@alxmal
alxmal / MANUAL.md
Created August 27, 2018 13:06 — forked from s-lyn/MANUAL.md
Deploy nodejs app with gitlab.com and pm2

Deploy nodejs app with gitlab.com and pm2

This manual is about setting up an automatic deploy workflow using nodejs, PM2, nginx and GitLab CI. It is tested on:

  • Target server: Ubuntu 16.04 x64. This is suitable for Ubuntu 14.x.
  • Windows 10 on my PC to work.
@alxmal
alxmal / _mixins.styl
Created June 22, 2018 10:17 — forked from dmitrykuznetsovdev/_mixins.styl
mixins.stylus
// Display:
// appearance
// box-align
// box-flex
// box-sizing
// box-orient
// box-pack
// display-box
// overflow-sroll
// user-select
@alxmal
alxmal / util-elastic-collision.js
Created October 7, 2017 16:35 — forked from christopher4lis/util-elastic-collision.js
A set of utility functions used to reproduce the effect of elastic collision within HTML5 canvas. Used in the Chris Courses tutorial video on collision detection: https://www.youtube.com/watch?v=789weryntzM
/**
* Rotates coordinate system for velocities
*
* Takes velocities and alters them as if the coordinate system they're on was rotated
*
* @param Object | velocity | The velocity of an individual particle
* @param Float | angle | The angle of collision between two objects in radians
* @return Object | The altered x and y velocities after the coordinate system has been rotated
*/