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 b2a(a) { | |
var c, d, e, f, g, h, i, j, o, b = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", k = 0, l = 0, m = "", n = []; | |
if (!a) return a; | |
do c = a.charCodeAt(k++), d = a.charCodeAt(k++), e = a.charCodeAt(k++), j = c << 16 | d << 8 | e, | |
f = 63 & j >> 18, g = 63 & j >> 12, h = 63 & j >> 6, i = 63 & j, n[l++] = b.charAt(f) + b.charAt(g) + b.charAt(h) + b.charAt(i); while (k < a.length); | |
return m = n.join(""), o = a.length % 3, (o ? m.slice(0, o - 3) :m) + "===".slice(o || 3); | |
} | |
function a2b(a) { | |
var b, c, d, e = {}, f = 0, g = 0, h = "", i = String.fromCharCode, j = a.length; |
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 | |
INPUT=fire_hydrants.csv | |
OLDIFS=$IFS | |
IFS=, | |
[ ! -f $INPUT ] && { echo "$INPUT file not found"; exit 99; } | |
while read -a csv_line | |
do | |
mv ${csv_line[0]}.pdf ${csv_line[8]}-${csv_line[0]}.pdf | |
done < $INPUT |
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
/** | |
Title: Google Apps Script for exporting CSV files from the Fulcrum Query API to a Drive folder | |
Notes: Be sure to manually run the exportData() function at least once to authorize the script. Set a timed trigger to automate exports. | |
Author: Bryan R. McBride | |
Contributor: Joe Larson, exportPhotos() | |
**/ | |
var fulcrumToken = "abcdefghijklmnopqrstuvwxyz"; | |
var fulcrumFormName = "My App"; | |
var filesFolder = "1ByvB7rSq_Pi2AE_JvqRFm6zUETbdJ8dG"; |
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
import urllib2 | |
import datetime | |
def timeStamped(fname, fmt='%Y-%m-%d-%H-%M-%S_{fname}'): | |
return datetime.datetime.now().strftime(fmt).format(fname=fname) | |
url = 'https://web.fulcrumapp.com/shares/6e158acd08cacfad.csv' | |
u = urllib2.urlopen(url) | |
localFile = open('fulcrum_data.csv', 'w') | |
localFile.write(u.read()) | |
localFile.close() | |
with open(timeStamped('fulcrum_data.csv'),'w') as outf: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
sudo mkdir -p /Library/Frameworks/GDAL.framework/Versions/1.9/ | |
sudo ln -s /usr/local/lib/libgdal.dylib /Library/Frameworks/GDAL.framework/Versions/1.9/GDAL | |
sudo mkdir -p /Library/Frameworks/PROJ.framework/Versions/4/ | |
sudo ln -s /usr/local/Cellar/proj/4.8.0/lib/libproj.dylib /Library/Frameworks/PROJ.framework/Versions/4/PROJ | |
# did not work: sudo ln -s `pwd`/libgeos.dylib /Library/Frameworks/GEOS.framework/Versions/3/GEOS | |
# did work: | |
# $PWD is /usr/local/Cellar/geos/3.3.6/lib | |
sudo ln -s `pwd`/libgeos_c.1.dylib /Library/Frameworks/GEOS.framework/Versions/3/GEOS | |
sudo mkdir -p /Library/Frameworks/SQLite3.framework/Versions/3/ | |
sudo ln -s /usr/local/Cellar/sqlite/3.7.15/lib/libsqlite3.0.8.6.dylib /Library/Frameworks/SQLite3.framework/Versions/3/SQLite3 |
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
# Install prerequisites before compiling: | |
apt-get install build-essential | |
apt-get install libfuse-dev | |
apt-get install fuse-utils | |
apt-get install libcurl4-openssl-dev | |
apt-get install libxml2-dev | |
apt-get install mime-support | |
# Download and Install | |
wget http://s3fs.googlecode.com/files/s3fs-1.61.tar.gz |
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
./configure \ | |
--with-local=yes \ | |
--prefix=/usr/local/gdal191 \ | |
--with-threads \ | |
--with-libtool \ | |
--with-libtiff=internal \ | |
--with-geotiff=internal \ | |
--with-pcraster=internal \ | |
--with-pcidsk=internal \ | |
--with-bsb \ |
NewerOlder