Skip to content

Instantly share code, notes, and snippets.

View autonome's full-sized avatar

Dietrich Ayala autonome

View GitHub Profile
@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.
*/
@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) },
@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;
@jhs
jhs / example.js
Created December 10, 2012 03:16
My Node.js modules these days
// Short module explanation // Something to gather my thoughts
// // I think this looks cool.
//
module.exports = the_exported_function // Modules are a function. Always.
//
module.exports.extra = extra // Additional API entry points if
module.exports.other = other // desired.
//
var util = require('util') // Other packages from npm or core
var assert = require('assert') // No comma-first due to lots of
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active May 2, 2024 05:55
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@timdream
timdream / README.md
Last active March 16, 2016 15:08
Build and update your own B2G build daily-ish without blow away data. Now comes with localization testing.

B2G Personal daily dogfooding instruction

This is how I generate my dogfood build, daily-ish. I do so to ensure I have (almost) total control over what goes into my phone so I could pick up the changes anytime I wanted (and indentifying the version of Gaia/Gecko I am using).

This instruction is used for Geeksphone Peak and with zh-TW locale. Replace/remove instruction for your own phone.

File locations:

  • update.sh should go to $B2G (the place you clone B2G repo with git).
@adrienjoly
adrienjoly / restartCoreAudio.sh
Created December 25, 2013 01:07
Mac Os X command to restart the core audio. I needed to use this in order to fix my AirPlay issue.
# You have to restart the core audio be pasting the following line into termnal
sudo kill `ps -ax | grep 'coreaudiod' | grep 'sbin' |awk '{print $1}'`
@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active February 12, 2024 17:18
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

OBSOLETE

This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.

I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

@paulrouget
paulrouget / ff.md
Last active November 21, 2021 21:13
Hacking Firefox
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active April 20, 2024 16:52
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\