Skip to content

Instantly share code, notes, and snippets.

View Martin-Pitt's full-sized avatar

Martin "Nexii" Pitt Martin-Pitt

View GitHub Profile
@gre
gre / easing.js
Last active April 16, 2024 19:53
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* This work is free. You can redistribute it and/or modify it under the
* terms of the Do What The Fuck You Want To Public License, Version 2,
* as published by Sam Hocevar. See the COPYING file for more details.
*/
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
@kirbysayshi
kirbysayshi / LICENSE
Last active March 19, 2024 07:25
Hierarchical Spatial Hash Grid: extremely efficient spatial hashing for collision detection between objects of any size! This is an implementation in JS as described in http://www10.informatik.uni-erlangen.de/~schornbaum/hierarchical_hash_grids.pdf
Copyright 2012 Andrew Petersen
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR O
/***************************************************************************
* FeatureLogger - Saves features detected by Modernizr to google analytics
***************************************************************************/
(function () {
var _gaq = _gaq || [],
Modernizr = Modernizr || {};
for(testName in Modernizr) // For every Modernizr test
if(typeof Modernizr[testName] === 'boolean') // If it is a boolean
_gaq.push(['_trackEvent', 'modernizr', testName, ((Modernizr[testName]) ? 'Yes' : 'No')]); // Log a yes or no
})();
@joyrexus
joyrexus / README.md
Last active August 21, 2023 16:59
Node.js streams demystified

A quick overview of the node.js streams interface with basic examples.

This is based on @brycebaril's presentation, Node.js Streams2 Demystified

Overview

Streams are a first-class construct in Node.js for handling data.

Think of them as as lazy evaluation applied to data.

@Martin-Pitt
Martin-Pitt / concentric-styling-order.md
Last active December 10, 2020 14:44
CSS Concentric Styling Order
{
	/* Where the box is placed */
	position: ;
	z-index: ;
	float: ;
	place-self: ;
	justify-self: ;
	align-self: ;
	vertical-align: ;
@Zekfad
Zekfad / conventional-commits.md
Last active April 19, 2024 03:26
Conventional Commits Cheatsheet

Quick examples

  • feat: new feature
  • fix(scope): bug in scope
  • feat!: breaking change / feat(scope)!: rework API
  • chore(deps): update dependencies

Commit types

  • build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
  • ci: Changes to CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
  • chore: Changes which doesn't change source code or tests e.g. changes to the build process, auxiliary tools, libraries
@benfoxall
benfoxall / generate.sh
Last active March 31, 2022 15:15
Generate video of satellite imagery
# Extract frames from GEOS Image Viewer to generate a video
# https://www.star.nesdis.noaa.gov/goes/fulldisk_band.php?sat=G16&band=GEOCOLOR&length=12&dim=1
mkdir -p images output
BASE=https://cdn.star.nesdis.noaa.gov/GOES16/ABI/FD/GEOCOLOR/
DIM=1808x1808
curl $BASE \
| grep -o -e "\".*GEOCOLOR-$DIM.jpg\"" \