Upload a GTFS file that contains shapes.txt
. Example GTFS files can be found at the GTFS Data Exchange.
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
// Set the feed URL | |
var EVENT_FEED_URL = 'http://www.google.com/calendar/feeds/default/private/full'; | |
// Create a calendar object | |
var calendarService = new google.gdata.calendar.CalendarEventEntry(); | |
// Create a new event handler | |
var quickEvent = new google.gdata.calendar.CalendarEventEntry(); | |
// Create a new property handler and set it to true |
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 | |
$source = file('http://example.com/example.csv'); | |
$csv_array = array_map('str_getcsv', $source, array_fill(0, count($source), ';')); | |
$header = array_shift($csv_array); | |
$result = array_map('array_combine', array_fill(0, count($csv_array), $header), $csv_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
function getFeed() { | |
var cache = CacheService.getPublicCache(); | |
var cachedFeed = cache.get("gas-relnotes-feed"); | |
if(cachedFeed == null) { | |
var URL = "https://developers.google.com/apps-script/release_notes"; | |
var feedSize = 25; | |
var data = UrlFetchApp.fetch(URL).getContentText(); | |
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 authorize_(method) { | |
var oauthConfig = UrlFetchApp.addOAuthService("twitter"); | |
oauthConfig.setAccessTokenUrl("https://api.twitter.com/oauth/access_token"); | |
oauthConfig.setRequestTokenUrl("https://api.twitter.com/oauth/request_token"); | |
oauthConfig.setAuthorizationUrl("https://api.twitter.com/oauth/authorize"); | |
oauthConfig.setConsumerKey(UserProperties.getProperty("CONSUMER_KEY")); | |
oauthConfig.setConsumerSecret(UserProperties.getProperty("CONSUMER_SECRET")); | |
return { | |
oAuthServiceName: "twitter", |
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
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment-with-locales.min.js"></script> | |
<script> | |
Y.use('node', 'node-load', function(Y) { | |
Y.on('domready', function() { | |
/* Locale to use with moments.js */ | |
var locale = 'de_AT'; | |
/* Format blog entries published dates */ | |
Y.all('time.published').each( | |
function() { |
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 showDbViewer() { | |
var DbViewer = UiApp.createApplication().setTitle('ScriptDb Viewer'); | |
// Query field and button | |
DbViewer.add( | |
DbViewer.createHorizontalPanel().setVerticalAlignment(UiApp.VerticalAlignment.MIDDLE).add( | |
DbViewer.createTextBox().setText("{}").setId("query").setName("query")) | |
.add( | |
DbViewer.createButton("Query", DbViewer.createServerHandler("queryDb") | |
.addCallbackElement(DbViewer.getElementById("query"))) |
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 oAuthConfig() { | |
var oAuthConfig = UrlFetchApp.addOAuthService("twitter"); | |
oAuthConfig.setAccessTokenUrl("http://api.twitter.com/oauth/access_token"); | |
oAuthConfig.setRequestTokenUrl("http://api.twitter.com/oauth/request_token"); | |
oAuthConfig.setAuthorizationUrl("http://api.twitter.com/oauth/authorize"); | |
// Register an app at https://dev.twitter.com/apps/new to get the following key and secret | |
oAuthConfig.setConsumerKey("key"); | |
oAuthConfig.setConsumerSecret("secret"); | |
} |
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 doGet(r) { | |
var translations = []; | |
var e = {error:{code:400}}; | |
try { | |
if(r.parameters.q) { | |
for(var n in r.parameters.q) { | |
translations.push({translatedText: | |
LanguageApp.translate( | |
r.parameters.q[n], | |
(r.parameters.source)?r.parameters.source: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
function oAuthConfig() { | |
var oAuthConfig = UrlFetchApp.addOAuthService("twitter"); | |
oAuthConfig.setAccessTokenUrl("http://api.twitter.com/oauth/access_token"); | |
oAuthConfig.setRequestTokenUrl("http://api.twitter.com/oauth/request_token"); | |
oAuthConfig.setAuthorizationUrl("http://api.twitter.com/oauth/authorize"); | |
// Register an app at https://dev.twitter.com/apps/new to get the following key and secret | |
oAuthConfig.setConsumerKey("PUT CONSUMER KEY HERE"); | |
oAuthConfig.setConsumerSecret("PUT CONSUMER SECRET HERE"); | |
} |
OlderNewer