Skip to content

Instantly share code, notes, and snippets.

Avatar

Ross Zurowski rosszurowski

View GitHub Profile
@rosszurowski
rosszurowski / nerp.js
Created Dec 10, 2014
An n-th degree polynomial interpolator. Used as an alternative for common `lerp` functions
View nerp.js
/**
* N-th degree polynomial interpolation
* @param {Number} degree
* @param {Number} min
* @param {Number} max
* @param {Number} amount
* @returns {Number}
*/
function nerp(degree, min, max, amount) {
return min + Math.pow(amount, degree) * (max - min);
View timestamp.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Timestamp Demo</title>
</head>
<body>
<x-timestamp>05/05/2015</x-timestamp>
<script src="timestamp.js"></script>
</body>
@rosszurowski
rosszurowski / data.json
Created Sep 22, 2015
Force-directed text editor
View data.json
{
"nodes":[
{"name":"Myriel","group":1},
{"name":"Napoleon","group":1},
{"name":"Mlle.Baptistine","group":1},
{"name":"Mme.Magloire","group":1},
{"name":"CountessdeLo","group":1},
{"name":"Geborand","group":1},
{"name":"Champtercier","group":1},
{"name":"Cravatte","group":1},
View keybase.md

I hereby claim:

  • I am rosszurowski on github.
  • I am rosszurowski (https://keybase.io/rosszurowski) on keybase.
  • I have a public key ASCO0gSAqgnGK91zdDer_TJW-oTr_bZBjfh6P9Sz-zxfhgo

To claim this, I am signing this object:

@rosszurowski
rosszurowski / subscribe.md
Last active Jan 11, 2020
How to subscribe to the Small Seasons calendar via iCal.
View subscribe.md

Small Seasons via iCal

If you'd like to follow along with the small seasons calendar via iCal, you'll want to create a new calendar subscription. On Mac, you can do this by going to File > New Calendar Subscription…

Into the panel that opens, paste the following URL:

https://calendar.google.com/calendar/ical/4eu29iflrjlhahh3kusp454n2c%40group.calendar.google.com/private-3f3d86651493934f026c4aca11baaf02/basic.ics
View react-resources.md

Here's a list of resources for learning React.

In general, I find the best way to learn something is to have a project to try it out with. These resources and tutorials are a good way to support your own project-based learning.

Introduction

Intro to React (link)

An official tutorial from the React team that walks you from zero to building a simple game. It does a great job of introducing all the core React concepts in simple language.

@rosszurowski
rosszurowski / un-country-centroids.json
Last active Feb 18, 2022
A compiled list of coordinates for all 193 countries in the UN. Compiled from this list of UN members (https://en.wikipedia.org/wiki/Member_states_of_the_United_Nations#Current_members), and this list of country centroids (http://gothos.info/resources/).
View un-country-centroids.json
[
{ "name": "Afghanistan", "lat": 33, "long": 66 },
{ "name": "Albania", "lat": 41, "long": 20 },
{ "name": "Algeria", "lat": 28, "long": 3 },
{ "name": "Andorra", "lat": 42.5, "long": 1.5 },
{ "name": "Angola", "lat": -12.5, "long": 18.5 },
{ "name": "Antigua and Barbuda", "lat": 17.05, "long": -61.8 },
{ "name": "Argentina", "lat": -34, "long": -64 },
{ "name": "Armenia", "lat": 40, "long": 45 },
{ "name": "Australia", "lat": -25, "long": 135 },
@rosszurowski
rosszurowski / export.go
Last active Mar 10, 2022
Download images from a Squarespace export file
View export.go
package main
import (
"context"
"encoding/xml"
"flag"
"fmt"
"io"
"log"
"net/http"
@rosszurowski
rosszurowski / lerp-color.js
Last active Jul 11, 2022
Linear interpolation for hexadecimal colors.
View lerp-color.js
/**
* A linear interpolator for hexadecimal colors
* @param {String} a
* @param {String} b
* @param {Number} amount
* @example
* // returns #7F7F7F
* lerpColor('#000000', '#ffffff', 0.5)
* @returns {String}
*/