Skip to content

Instantly share code, notes, and snippets.

View autonome's full-sized avatar

Dietrich Ayala autonome

View GitHub Profile
@bobend
bobend / index.html
Created November 27, 2012 15:09
"10 PRINT CHR$(205.5+RND(1)); : GOTO 10" - javascript version
<!DOCTYPE html>
<html>
<head>
<title>Index</title>
</head>
<body style="margin: 0px;">
<div style="word-wrap: break-word; line-height: 1em;" id="content"></div>
<script type="text/javascript">
var boxes = ["╱", "╲"];
var max = 4000;
@ederoyd46
ederoyd46 / GeoLocation.js
Created May 5, 2012 20:01
Javascript for finding latitude and longitude range boundaries
//Javascript for finding latitude and longitude range boundaries.
//Based on the excellent Java example by http://janmatuschek.de/LatitudeLongitudeBoundingCoordinates
var GeoLocation = GeoLocation ? GeoLocation : {
TO_RADIAN: 0.0174532925,
TO_DEGREE: 57.2957795,
EARTH_RADIUS: 6371.01,
TO_MILE: 0.621371192,
TO_KM: 1.609344,
MIN_LAT: function() { return GeoLocation.degreeToRadian(-90) },
@banksean
banksean / perlin-noise-classical.js
Created February 15, 2010 10:00
two Perlin noise generators in javascript. The simplex version is about 10% faster (in Chrome at least, haven't tried other browsers)
// Ported from Stefan Gustavson's java implementation
// http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf
// Read Stefan's excellent paper for details on how this code works.
//
// Sean McCullough banksean@gmail.com
/**
* You can pass in a random number generator object if you like.
* It is assumed to have a random() method.
*/