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
# IDEA Ignores # | |
################ | |
*.iml | |
*.ipr | |
*.iws | |
.idea/ | |
out/ | |
local.properties | |
# Generic Android ignores # |
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
<?php | |
//Quotes: Replace smart double quotes with straight double quotes. | |
//ANSI version for use with 8-bit regex engines and the Windows code page 1252. | |
preg_replace('[\x84\x93\x94]', '"', $text); | |
//Quotes: Replace smart double quotes with straight double quotes. | |
//Unicode version for use with Unicode regex engines. | |
preg_replace('[\u201C\u201D\u201E\u201F\u2033\u2036]', '"', $text); |
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 arcpy | |
from arcpy import env | |
env.workspace = "c:/workspace" | |
# variables | |
in_features = "soils.shp" | |
clip_features = "study_boundary.shp" |
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/sh | |
curl -s \ | |
-F "token=APP_TOKEN" \ | |
-F "user=USER_TOKEN" \ | |
-F "title=Download Finished" \ | |
-F "message=$TR_TORRENT_NAME: $TR_TIME_LOCALTIME" \ | |
http://api.pushover.net/1/messages > /dev/null |
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
{ | |
"types":[ | |
"ABBOTTSWOOD", | |
"ACCESS", | |
"ACRES", | |
"AFIELD", | |
"ALLEY", | |
"ANNEX", | |
"APPROACH", | |
"ARBORWAY", |
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 tidy | |
brew install tidy | |
# Export the Word doc as HTML | |
# Create a config file named tidy-config.txt like below | |
# Find more at http://tidy.sourceforge.net/ | |
tidy -config tidy-config.txt -o cleaned.html -i dirty.htm |
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
/* | |
You'll need something like this in your HTML: | |
<script src="http://d3js.org/topojson.v1.min.js"></script> | |
*/ | |
L.TopoJSON = L.GeoJSON.extend({ | |
addData: function(jsonData) { | |
if (jsonData.type === "Topology") { | |
for (key in jsonData.objects) { | |
geojson = topojson.feature(jsonData, jsonData.objects[key]); |
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
# Bulk convert shapefiles to geojson using ogr2ogr | |
# For more information, see http://ben.balter.com/2013/06/26/how-to-convert-shapefiles-to-geojson-for-use-on-github/ | |
# Note: Assumes you're in a folder with one or more zip files containing shape files | |
# and Outputs as geojson with the crs:84 SRS (for use on GitHub or elsewhere) | |
#geojson conversion | |
function shp2geojson() { | |
ogr2ogr -f GeoJSON -t_srs crs:84 "$1.geojson" "$1.shp" | |
} |
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
<?php | |
header('Content-type: text/plain'); | |
# Grab URL | |
$ch = curl_init($_GET['url']); | |
curl_setopt($ch, CURLOPT_HEADER, 0); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
$urlin = curl_exec($ch); | |
curl_close($ch); | |
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
python -m SimpleHTTPServer & open -a "Google Chrome" http://localhost:8000 |
OlderNewer