Skip to content

Instantly share code, notes, and snippets.

View kavicastelo's full-sized avatar
💻
Living in a program

kavi castelo kavicastelo

💻
Living in a program
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kavicastelo
kavicastelo / util-elastic-collision.js
Created November 28, 2023 16:55 — 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
*/
@kavicastelo
kavicastelo / facebook_combined.txt
Last active November 18, 2023 18:12
suitable large-size dataset for studying network nodes. (Under analytical business intelligence)
0 1
0 2
0 3
0 4
0 5
0 6
0 7
0 8
0 9
0 10
@kavicastelo
kavicastelo / Countries.json
Last active November 17, 2023 17:17
All countries list with country name, country name code(2), country name code(3) and country number. 2023 update.
[
{ code: "AF", code3: "AFG", name: "Afghanistan", number: "004" },
{ code: "AL", code3: "ALB", name: "Albania", number: "008" },
{ code: "DZ", code3: "DZA", name: "Algeria", number: "012" },
{ code: "AS", code3: "ASM", name: "American Samoa", number: "016" },
{ code: "AD", code3: "AND", name: "Andorra", number: "020" },
{ code: "AO", code3: "AGO", name: "Angola", number: "024" },
{ code: "AI", code3: "AIA", name: "Anguilla", number: "660" },
{ code: "AQ", code3: "ATA", name: "Antarctica", number: "010" },
{ code: "AG", code3: "ATG", name: "Antigua and Barbuda", number: "028" },