tell application "Google Chrome"
set myTab to make new tab at end of tabs of window 1
set URL of myTab to "http://google.com"
end tell
more AppleScript Chrome goodies at http://laclefyoshi.blogspot.com/2010/10/google-chrome-ver.html
tell application "Google Chrome"
set myTab to make new tab at end of tabs of window 1
set URL of myTab to "http://google.com"
end tell
#!/bin/bash
uid=`ssh <your.server> 'id -u'
echo $uid
curl --data-urlencode "code=`cat src/gen_pilot_data.py`" http://localhost:8079/_ah/admin/interactive/execute
cities = [
{ 'name': 'Tokyo', 'lat': 35.6894875, 'lon': 139.6917064 },
{ 'name': 'Seoul', 'lat': 37.566535, 'lon': 126.9779692 },
{ 'name': 'Beijing', 'lat': 39.904214, 'lon': 116.407413 },
{ 'name': 'New Delhi', 'lat': 28.635308, 'lon': 77.22496 },
{ 'name': 'Moscow', 'lat': 55.755786, 'lon': 37.617633 },
{ 'name': 'Kiev', 'lat': 50.45, 'lon': 30.5233333 },
{ 'name': 'Budapest', 'lat': 47.4984056, 'lon': 19.0407578 },
{ 'name': 'Berlin', 'lat': 52.5234051, 'lon': 13.4113999 },
{ 'name': 'Paris', 'lat': 48.8566667, 'lon': 2.3509871 },
{ 'name': 'Madrid', 'lat': 40.4166909, 'lon': -3.7003454 },
{ 'name': 'New York', 'lat': 40.7143528, 'lon': -74.0059731 },
{ 'name': 'Mexico City', 'lat': 19.4270499, 'lon': -99.1275711 },
{ 'name': 'Honolulu', 'lat': 21.3069444, 'lon': -157.8583333 },
{ 'name': 'Sydney', 'lat': -33.8599722, 'lon': 151.2111111 },
{ 'name': 'Taipei', 'lat': 25.091075, 'lon': 121.5598345 }
]
// creating the map
var map = new google.maps.Map(document.getElementById("map_canvas"), {
mapTypeId: google.maps.MapTypeId.ROADMAP
});
// latitude, longitude values
var latLons = [ { lat: 35.6453962, lon: 139.7117893 },
{ lat: 35.645076, lon: 139.709183 } ];
// this is the bounding box container
var bounds = new google.maps.LatLngBounds();
// iterating through the points
latLons.forEach( function (element, index, array) {
var point = new google.maps.LatLng(element.lat,element.lon);
// extending the bounding box
bounds.extend(point);
// creating the marker on the map
var marker = new google.maps.Marker({
position: point,
map: map
});
});
// zooming on the map
map.fitBounds(bounds);
tell application "Google Chrome"
activate
end tell
tell application "System Events"
tell process "Google Chrome"
keystroke "r" using {command down}
end tell
end tell
sed -i '' -e's/[ \t]*$//' $1