This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using System.Collections; | |
| public delegate void MetronomeEvent(Metronome metronome); | |
| public class Metronome : MonoBehaviour { | |
| public int Base; | |
| public int Step; | |
| public float BPM; | |
| public int CurrentStep = 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Install Macports. | |
| //Install aircrack-ng: | |
| sudo port install aircrack-ng | |
| //Install the latest Xcode, with the Command Line Tools. | |
| //Create the following symlink: | |
| sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport | |
| //Figure out which channel you need to sniff: | |
| sudo airport -s | |
| sudo airport en1 sniff [CHANNEL] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var str = "The quick brown fox jumped over the box like an ox with a sox in its mouth"; | |
| str.match(/\w(ox)/g); // ["fox", "box", "sox"] | |
| // match (when used with a 'g' flag) returns an Array with all matches found | |
| // if you don't use the 'g' flag then it acts the same as the 'exec' method. | |
| str.match(/\w(ox)/); // ["fox", "ox"] | |
| /\w(ox)/.exec(str); // ["fox", "ox"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "Mercator.h" | |
| #include "cinder/app/AppBasic.h" | |
| #include "cinder/Vector.h" | |
| using namespace ci; | |
| using namespace std; | |
| /* static method to map latitude and longitude to mercator 2d coords */ | |
| Vec2f Mercator::mapLatLon( const Vec2f lat_lon ) { | |
| /* mercator projection center was screen centered */ | |
| Vec2f offset = Vec2f( app::getWindowWidth() / 2, app::getWindowHeight() / 2 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defpackage #:perlin | |
| (:use #:cl) | |
| (:export #:perlin2d | |
| #:*seed*)) | |
| (in-package #:perlin) | |
| (declaim (optimize (speed 3) (safety 0) (debug 0))) | |
| (defparameter *seed* 0) |
NewerOlder