Skip to content

Instantly share code, notes, and snippets.

View bcamper's full-sized avatar

Brett Camper bcamper

View GitHub Profile
@aemkei
aemkei / LICENSE.txt
Created October 27, 2011 17:16 — forked from 140bytes/LICENSE.txt
Lorenz Attractor - 140byt.es
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@gpavlidi
gpavlidi / n3mtodae.c
Created February 4, 2012 23:19 — forked from praeclarum/n3mtodae.c
Converts Nokia 3D models to textured DAE models (http://maps3d.svc.nokia.com/webgl/index.html)
#include <io.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <windows.h>
#include <Share.h>
#include <math.h>
@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active July 25, 2024 10:41
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
@kirbysayshi
kirbysayshi / StackMemory.js
Created July 16, 2012 16:44
Determine which values have changed, and also save/restore values similar to the way canvas.context works.
// see http://jsbin.com/ipufab/latest for live demo
StackMemory = function( trackList, rootCtx ){
this.watchHash = {};
this.rootCtx = rootCtx;
this.trackList = trackList;
this.hashList = [];
this.initializeTrackList( trackList );
}
@1wErt3r
1wErt3r / SMBDIS.ASM
Created November 9, 2012 22:27
A Comprehensive Super Mario Bros. Disassembly
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger (doppelheathen@gmail.com)
;This file is provided for your own use as-is. It will require the character rom data
;and an iNES file header to get it to work.
;There are so many people I have to thank for this, that taking all the credit for
;myself would be an unforgivable act of arrogance. Without their help this would
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no
@atduskgreg
atduskgreg / hatched_drawing.pde
Created February 23, 2013 17:09
Render in a hatched shading style from a source image including canny edge filter using JavacvPro for lines
import monclubelec.javacvPro.*;
PImage img, original;
PGraphics hash;
PImage hashImg;
PImage[] hatchLevels;
int hatchSpacing = 5;
OpenCV opencv;
@wboykinm
wboykinm / index.html
Created November 10, 2013 04:09
Leaflet + D3 + Vector Tiles (via Nelson Minar)
<!DOCTYPE html>
<meta charset="utf-8">
<title>D3 GeoJSON in Leaflet</title>
<link href='http://api.tiles.mapbox.com/mapbox.js/v1.4.0/mapbox.css' rel='stylesheet' />
<!--[if lte IE 8]>
<link href='http://api.tiles.mapbox.com/mapbox.js/v1.4.0/mapbox.ie.css' rel='stylesheet'>
<![endif]--><style>
html, body, #map { height: 100%;width:100%; background:#020B26;position:absolute;}
body { padding: 0; margin: 0; }
path { stroke-linejoin; round; stroke-linecap: round; fill: none}
#!/bin/bash
# Settings: edit these as needed
PROJECT_NAME="test"
OUTPUT_DIRECTORY="~/Documents/MapBox/export/"
# first change into TileMill code directory
cd /Applications/TileMill.app/Contents/Resources/
# hint: use http://bboxfinder.com/ to get bounds in lon/lat
@mattdesl
mattdesl / ContextLoss.js
Created April 5, 2014 17:54
Simulating context loss with a mouse click
var loseCtx = context.gl.getExtension("WEBGL_lose_context");
//May not exist in some browsers, or if WebGLInspector is enabled
if (loseCtx) {
//Attach a mouse click to the canvas...
canvas.addEventListener("mousedown", function() {
//Force the canvas to lose its WebGL context
loseCtx.loseContext();
//Here you may want to present the user with a progress indicator
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active July 24, 2024 14:58
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);