Last command's parameters: !* TAB
Last command's first parameter: !^ TAB
Last command's last parameter: !$ TAB
$1
,$2
,$3
, ... are the [positional parameters][1]."$@"
is an array-like construct of all positional parameters,{$1, $2, $3 ...}
."$*"
is the IFS expansion of all positional parameters,$1 $2 $3 ...
.$#
is the number of positional parameters.$-
current options set for the shell.$$
pid of the current shell (not subshell).$_
most recent parameter (or the abs path of the command to start the current shell immediately after startup).$IFS
is the (input) field separator.$?
is the most recent foreground pipeline exit status.$!
is the PID of the most recent background command.
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
EPSG: 4326 uses a coordinate system on the surface of a sphere or ellipsoid of reference. | |
WGS 84 - Earth as Geoid. -Mercator | |
EPSG: 3857 uses a coordinate system PROJECTED from the surface of the | |
sphere. Earth as perfectly sphere. -Web Mercator | |
Think of it as this way: | |
EPSG 4326 uses a coordinate system the same as a GLOBE (curved surface). | |
EPSG 3857 uses a coordinate system the same as a MAP (flat surface). |
###export bounding box for reuse export LON1=-74.259094 export LAT1=40.477398 export LON2=-73.700165 export LAT2=40.91758
###mapbbox.js
outputs a .png image using the Web Mercator (EPSG: 3857) projection
./mapbbox.js -h 480 -w 640 \ #dimensions of output image (px)
-b $LON1,$LAT1,$LON2,$LAT2 \ #bounds: lon1,lat1,lon2,lat2
find | replace |
---|---|
isset *\( *(\$(?:_?)?(?:\w*)) *\[ ?([\w'"\$]*) *\] *\) |
array_key_exists($2,$1) |
ex:
isset($_SERVER['something']) => array_key_exists('something',$_SERVER)
isset( $_SERVER['something']) => array_key_exists('something',$_SERVER)
isset( $_SERVER['something' ]) => array_key_exists('something',$_SERVER)
isset( $_SERVER ['something' ] ) => array_key_exists('something',$_SERVER)
isset($_SERVER['some_1_Thing1']) => array_key_exists('some_1_Thing1',$_SERVER)
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
$.fn.swapClass = function(a, b) { | |
if (a && b) { | |
this.toggleClass(a).toggleClass(b); | |
} else { | |
let arr = this.selector.split(','); | |
if (arr.length < 2) { | |
return this; | |
} | |
return this.swapClass(arr[0].substr(1), arr[1].substr(1)); | |
} |
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
@media(max-width:767px){} | |
@media(min-width:768px){} | |
@media(min-width:992px){} | |
@media(min-width:1200px){} |
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 | |
import json | |
from arcpy import env | |
env.workspace = "E:/master_regions_unpacked" | |
txtFile = open("E:/master_regions/regionArray","w") | |
txt = [] | |
files = arcpy.ListFiles("*.dbf") | |
for file in files: | |
txt.append("'"+str(file).split(".")[0]+"'=>array(") |
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="E:\master_regions_unpacked" | |
files = arcpy.ListFiles("*.dbf") | |
for file in files: | |
arcpy.AddField_management(file, "CODE", "TEXT") |