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
require 'shellwords' | |
require 'highline/import' | |
target_ext = ask("file extension to target (excluding the period)?") | |
output_ext = ask("output file extension? press enter to default to zip") | |
output_ext = output_ext.blank? ? "zip" : output_ext | |
files = Dir.glob("*.#{target_file_extension}") | |
files.each do |f| |
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
where("st_intersects(proj_shape_4326, ST_GeomFromText('#{shp.as_text}',4326))") |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Construction Monitor</title> | |
<link data-turbolinks-track="true" href="/assets/application.css?body=1" media="all" rel="stylesheet" /> | |
<link data-turbolinks-track="true" href="/assets/bootstrap_and_overrides.css?body=1" media="all" rel="stylesheet" /> | |
<link data-turbolinks-track="true" href="/assets/draws.css?body=1" media="all" rel="stylesheet" /> | |
<link data-turbolinks-track="true" href="/assets/property.css?body=1" media="all" rel="stylesheet" /> | |
<script data-turbolinks-track="true" src="/assets/jquery.js?body=1"></script> |
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
class ActiveRecord::Base | |
def self.dump_json(sql="") | |
records = sql.blank? ? all : where(sql) | |
`touch #{self}_backup.json` | |
File.open(File.join(Rails.root, "#{self}_backup.json"), 'w') do |f| | |
f.write(records.to_json) | |
end | |
end | |
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
Process: Google Earth [17592] | |
Path: /Applications/Google Earth Pro.app/Contents/MacOS/Google Earth | |
Identifier: com.Google.GoogleEarthPro | |
Version: 7.1 (7.1.5.1557) | |
Code Type: X86 (Native) | |
Parent Process: ??? [1] | |
Responsible: Google Earth [17592] | |
User ID: 502 | |
Date/Time: 2016-01-21 16:45:50.411 -0500 |
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
<OGRVRTDataSource> | |
<OGRVRTLayer name="costar_data"> | |
<SrcDataSource>costar_data.csv</SrcDataSource> | |
<GeometryType>wkbPoint</GeometryType> | |
<GeometryField encoding="PointFromColumns" x="Longitude" y="Latitude"/> | |
</OGRVRTLayer> | |
</OGRVRTDataSource> |
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
latest_download = Dir.glob("/Users/daviddouglas/Downloads/Export*.csv").max do |a,b| | |
File.ctime(a) <=> File.ctime(b) | |
end | |
puts "latest download is #{latest_download}" | |
`cp #{latest_download} /Users/daviddouglas/sikuli_scripts` | |
basename = File.basename(latest_download) | |
`mv #{basename} costar_data.csv` | |
`ogr2ogr -f KML costar_data.kml costar_vrt.vrt` | |
`open costar_data.kml` | |
`say "save the KML somewhere else to prevent from being overwritten"` |
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
require 'geocoder' | |
require 'highline/import' | |
puts "to use this tool again after running, run `GeoreferencerBuddy.go`.\nto use just the lat/lng plucker, there is also a class method called `pluck`" | |
# | |
#this tool is best if added as an alias to .bash_profile or equivalent. | |
#example: | |
#alias georeference='ruby /Users/davo/helpers/georeference_buddy.rb' | |
#alias geo='georeference' |
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
#include <LiquidCrystal.h> | |
// initialize the library with the numbers of the interface pins | |
LiquidCrystal lcd(8, 9, 4, 5, 6, 7); | |
//Key message | |
char msgs[5][15] = {"Right Key OK ", | |
"Up Key OK ", | |
"Down Key OK ", | |
"Left Key OK ", | |
"Select Key OK" }; |
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
I used this tutorial on January 12 to setup my ubuntu server gis situation. | |
----------- | |
LoginHelp/GuideAbout TracPreferences | |
WikiTimelineRoadmapBrowse SourceView TicketsSearch | |
Start PageIndexHistoryLast Change | |
How to Get Started with PostGIS 2.0 on Ubuntu 12.04 (precise) | |
(minor updates as of 12/18/12) (This installation may generate some errors related to jvm - please see: http://www.jaloonz.com/2012/08/installing-postgis-201-on-ubuntu-1204.html if you run into any problems.) |
NewerOlder