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
#!/bin/bash | |
# update and add user | |
apt-get update | |
useradd -G users <username> | |
passwd <username> | |
visudo #add sparafina to shudders | |
# install apache |
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
# To run the script you must set PYTHONPATH and path to QGIS binaries | |
# | |
# on Linux: export PYTHONPATH=/qgispath/share/qgis/python | |
# on Windows: set PYTHONPATH=c:\qgispath\python | |
# on OSX: export PYTHONPATH=/Applications/QGIS.app/Contents/Resources/python | |
# export PATH="/Applications/QGIS.app/Contents/MacOS/bin:$PATH" | |
from qgis.core import * | |
import sys | |
import os |
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
 | |
Point: Point (10 10) | |
LineString: LineString ( 10 10, 20 20, 30 40) | |
Polygon: Polygon ((10 10, 10 20, 20 20, 20 15, 10 10)) | |
Multipoint: MultiPoint ((10 10), (20 20)) | |
MultiLineString: MultiLineString ((10 10, 20 20), (15 15, 30 15)) |
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
possible Shmoocon January 27-29 - no tickets | |
flight/hotel booked Strata February 28-March 1st - done | |
longshot SXSW Interactive March 9-13 - nope | |
flight/hotel booked WhereConf April 2-4 - presentation accepted | |
AR Standards Meeting March 19-20, Austing - purchased | |
flight/hotel booked FOSS4G North America April 10-12 - presentation accepte/moderating panel | |
definite ARE2012 May 8-9 - Ignite talk accepted | |
definite Google I/O June 27-29 | |
flight/hotel booked HOPE Number Nine July 13-15 | |
longshot FOSS4G Beijing??? August/Sept |
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
INSERT INTO geo_header_sf1 (fileid, stusab, sumlev, geocomp, chariter, cifsn, logrecno, region, division, state, county, countycc, countysc, cousub, cousubcc, cousubsc, place, placecc, placesc, tract, blkgrp, block, iuc, concit, concitcc, concitsc, aianhh, aianhhfp, aianhhcc, aihhtli, aitsce, aits, aitscc, ttract, tblkgrp, anrc, anrccc, cbsa, cbsasc, metdiv, csa, necta, nectasc, nectadiv, cnecta, cbsapci, nectapci, ua, uasc, uatype, ur, cd, sldu, sldl, vtd, vtdi, reserve2, zcta5, submcd, submcdcc, sdelem, sdsec, sduni, arealand, areawatr, name, funcstat, gcuni, pop100, hu100, intptlat, intptlon, lsadc, partflag, reserve3, uga, statens, countyns, cousubns, placens, concitns, aianhhns, aitsns, anrcns, submcdns, cd113, cd114, cd115, sldu2, sldu3, sldu4, sldl2, sldl3, sldl4, aianhhsc, csasc, cnectasc, memi, nmemi, puma, reserved) | |
SELECT | |
trim(substring(data,1,6)) AS fileid, | |
trim(substring(data,7,2)) AS stusab, | |
trim(substring(data,9,3)) AS sumlev, | |
trim(substring(data,12,2)) AS geocomp, | |
trim(substring(data,14,3)) AS |
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
-- drop table data_field_descriptors; | |
create table data_field_descriptors | |
( | |
sort id integer, | |
segment varchar(4), | |
table number varchar(12), | |
field name varchar(510), | |
field code varchar(20), | |
decimal integer | |
); |
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
CREATE TABLE geo_header_staging(data text); | |
copy geo_header_staging FROM '/path/to/dcgeo2010.sf1' DELIMITER AS '|'; |
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
paste <(awk '{print $1;}' gtemp) <(cut -f1 gfields) |
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
awk '{total+=$0}END{print total}' file |
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
awk '{total+=$0}END{print total}' file |