This file contains 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
function drawArc(centerX:Number, centerY:Number, startAngle:Number, endAngle:Number, radius:Number, direction:Number) | |
/* | |
centerX -- the center X coordinate of the circle the arc is located on | |
centerY -- the center Y coordinate of the circle the arc is located on | |
startAngle -- the starting angle to draw the arc from | |
endAngle -- the ending angle for the arc | |
radius -- the radius of the circle the arc is located on | |
direction -- toggle for going clockwise/counter-clockwise | |
*/ | |
{ |
This file contains 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
/** | |
* Google Maps Tile Carver for Photoshop | |
* | |
* @description Tiles a photoshop image to create a Custom Map Type for Google Maps API, tested with CS4 and CS5 | |
* @since 2010-09-01 | |
* @author Will James, http://onNYTurf.com (creator) | |
* @author Curtis Wyatt, http://gocalipso.com/ | |
* @author Nate Bundy, http://www.lemonrage.com/ | |
* @author Uli Schöberl, http://aplusplus.org | |
*/ |
This file contains 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
#!/bin/bash | |
echo -n "{\"version\": \"1.1.0\",\"host\": \"maps.google.com\",\"request_address\": true,\"address_language\": \"en_GB\", \"wifi_towers\": [`iwlist scan 2> /dev/null | tr -d '\n' | sed -e 's/Cell [0-9]* - Address: \([0-9A-Z:]*\)[^C]*Channel:\([0-9]*\)[^S]*Signal level=\([0-9-]*\) dBm[^E]*E[^E]*ESSID:"\([^"]*\)"/\{"mac_address": "\1","signal_strength": \3,"age": 0,"channel": \2,"ssid": "\4"}/g' -e 's/[^{]*{/{/' -e 's/}[^{]*{/},{/g' -e 's/\}[^}]*$/\}/' `]}" | curl -s -X POST -d @/dev/fd/0 http://www.google.com/loc/json | |
# TIP: run with sudo for improved accuracy since iwlist can then provide more than the active hotspot |