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
/** | |
* Functions for HtmlEditorFields in the back end. | |
* Includes the JS for the ImageUpload forms. | |
* | |
* Relies on the jquery.form.js plugin to power the | |
* ajax / iframe submissions | |
*/ | |
var ss = ss || {}; | |
/** |
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
<?php | |
class Grocery extends DataObject { | |
private static $db = array( | |
'Name' => 'Varchar(255)', | |
'Price' => 'Int' | |
); | |
private static $belongs_many_many = array( | |
'GroceryPages' => 'GroceryPage' |
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
puts "mkdir thumbs" | |
Dir.glob('*.mp4').sort.select{ |e| | |
filename = "#{e}" | |
percents = [] | |
(4..100).step(4) do |n| | |
percents << n | |
end |
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
gpscorrelate -v -g RK_gpx\ _2014-09-27_0948.gpx *.JPG | |
EXIF-GPS Photo matching program. | |
Daniel Foote, 2005. | |
Reading GPS Data... | |
Correlate: | |
IMG_8962.JPG: Interpolated: Lat 13.680397, Long 100.584767, Elev 5.000000. | |
IMG_8984.JPG: Exact match: Lat 13.677067, Long 100.582568, Elev 3.900000. | |
IMG_8986.JPG: Interpolated: Lat 13.676461, Long 100.582233, Elev 3.500000. |
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
> gpscorrelate -v -n -g RK_gpx\ _2014-09-27_0948.gpx *.JPG | |
EXIF-GPS Photo matching program. | |
Daniel Foote, 2005. | |
Reading GPS Data... | |
Correlate: | |
IMG_8962.JPG: Interpolated: Lat 13.680397, Long 100.584767, Elev 5.000000. | |
IMG_8984.JPG: Exact match: Lat 13.677067, Long 100.582568, Elev 3.900000. | |
IMG_8986.JPG: Interpolated: Lat 13.676461, Long 100.582233, Elev 3.500000. |
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
This is an example Gist |
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
$map->setClusterer( true ); |
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
public function MapWithDataList() { | |
$flickrPhotos = DataList::create( 'FlickrPhoto' )->where( 'Lat != 0 AND Lon !=0' ); | |
if ( $flickrPhotos->count() == 0 ) { | |
return ''; // don't render a map | |
} | |
$map = $flickrPhotos->getRenderableMap(); | |
$map->setZoom( $this->ZoomLevel ); | |
$map->setAdditionalCSSClasses( 'fullWidthMap' ); | |
$map->setShowInlineMapDivStyle( true ); |
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
$map->addLine( $point1, $point2, $colorHexCode ); |
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
/* | |
Render a triangle around the provided lat,lon, zoom from the editing functions, | |
*/ | |
public function MapWithLines() { | |
$map = $this->owner->getRenderableMap(); | |
$map->setZoom( $this->ZoomLevel ); | |
$map->setAdditionalCSSClasses( 'fullWidthMap' ); | |
$map->setShowInlineMapDivStyle( true ); | |
$scale = 0.3; |