Skip to content

Instantly share code, notes, and snippets.

View llafuente's full-sized avatar

llafuente

  • Noboxout
  • Madrid
View GitHub Profile
https://github.com/dristic/exstoengine/blob/047155d3fba18b05b23a9c3ecf23b8889f113f2c/src/physics/CollisionResolver.js
https://github.com/colorhook/JPE/blob/master/src/CollisionResolver.js
https://github.com/liabru/matter-js/blob/master/src/collision/Resolver.js
https://github.com/schteppe/p2.js/tree/master/src/solver
https://katyscode.wordpress.com/2013/01/18/2d-platform-games-collision-detection-for-dummies/#more-1160
https://github.com/henryeverett/ToastCollisions2D
http://www.cs.sjsu.edu/faculty/pollett/masters/Semesters/Spring12/josh/joshua_newth.pdf (38+)
@llafuente
llafuente / gist:7f9db649893e62b732c1
Created December 22, 2014 10:24
From one color to another.
// wip, i stop because someone standarize 'filter' after many years in IE, and decide to use a different syntax. WTF!
.debug(@var) {
&:after {
content: "@{var} - @{@{var}}";
}
}
@hue_diff: hue(#384a5e) - hue(#455b73);
@sat_diff: saturation(#384a5e) - saturation(#455b73);
@llafuente
llafuente / language
Created November 5, 2014 22:55
language
> Unlike the assignment operator in C and Objective-C, the assignment operator in Swift does not itself return a value. The following statement is not valid:
> if x = y {}
> The remainder operator (%) is also known as a modulo operator in other languages. However, its behavior in Swift for negative numbers means that it is, strictly speaking, a remainder rather than a modulo operation.
> The unary plus operator (+) simply returns the value it operates on, without any change:
> --> + means you want a positive number so abs!
> The closed range operator (a...b) defines a range that runs from a to b, and includes the values a and b. The value of a must not be greater than b.
@llafuente
llafuente / .gitconfig
Last active October 22, 2015 10:06
Git diary, tutorial & config
[color]
ui = auto
[core]
editor = vim
autocrlf = input
fileMode = false
[merge]
tool = diffmerge
ff = true
[alias]
@llafuente
llafuente / tempus.test.timezone.js
Created June 20, 2012 13:08
Tempus timezone test
QUnit.module('timezone-DST');
covers(Tempus.prototype, 'Tempus', 'timezone-DST');
QUnit.test('timezone-DST()', function () {
// api proposal
// Tempus.setDefaultTimezone(false); // use the system timezone width DST
// Tempus.setDefaultTimezone(<number>); // use GMT+-<number> allways without DST
// this test supose the use of Tempus.setDefaultTimezone(0);
@llafuente
llafuente / tempus-js.js
Created April 11, 2012 13:44
tempus-js timezone offsets [cleaned]
/**
* Tempus - Time for a new Date()
*
* Tempus is a full replacement for Date(), the standard Date class in JavaScript.
*
* This code is licensed under the MIT
* For the full license see: http://keithamus.mit-license.org/
* For more information see: http://keithamus.github.com/tempus
*
* @author Keith Cirkel ('keithamus') <tempus@keithcirkel.co.uk>