Skip to content

Instantly share code, notes, and snippets.

View ddd1600's full-sized avatar

David Douglas ddd1600

  • Murrells Inlet, SC
View GitHub Profile
where("st_intersects(proj_shape_4326, ST_GeomFromText('#{shp.as_text}',4326))")
@ddd1600
ddd1600 / zip_individual_files.rb
Last active February 27, 2018 20:16
zip individual files inside of folder
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|