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
require 'fakeweb' | |
require 'yaml' | |
Rails.logger.info "Using FakeWeb: #{GeoNamesAPI.url}::#{GeoNamesAPI.username}" | |
# expects a fixture with the following geonames data format: | |
# 42.93,-71.43: | |
# json: > | |
# { "time": "2014-01-12 12:41", "countryName": "United States", "sunset": "2014-01-12 16:33", | |
# "rawOffset": -5, "dstOffset": -4, "countryCode": "US", "gmtOffset": -5, "lng": -71.43, |
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 onEdit(e) { | |
// https://code.google.com/p/google-apps-script-issues/issues/detail?id=2521 | |
// var e = { range: SpreadsheetApp.getActiveRange(), value : "bug 972929" }; | |
function fetchBug(bugNumber) { | |
var url = "https://api-dev.bugzilla.mozilla.org/latest/bug/" + bugNumber; | |
var parameters = {}; | |
var response = UrlFetchApp.fetch(url, parameters); |
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
/* | |
Copyright (c) 2012-2014 RedBearLab | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE |
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
var googleapis = loopback.createDataSource({ | |
connector: require("loopback-connector-rest"), | |
strictSSL: false, | |
debug: false, | |
defaults: { | |
"headers": { | |
"accept": "application/json", | |
"content-type": "application/json" | |
} | |
}, |
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
"geonames": { | |
"name": "geonames", | |
"debug": true, | |
"connector": "rest", | |
"operations": [ | |
{ | |
"template": { | |
"doc": "GeoNames API: timezoneJSON", | |
"method": "GET", | |
"url": "http://api.geonames.org/timezoneJSON", |
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
// server/boot/email.js | |
var htmlToText = require('nodemailer-html-to-text').htmlToText; | |
var path = require('path'); | |
function templatePath (template) { | |
// this looks for templates in the root 'templates' folder where other email templates like verify.ejs exist | |
return path.join(__dirname, '..', '..', 'templates', template); | |
} |
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
Cu.import("resource://gre/modules/FxAccounts.jsm"); | |
fxAccounts.getSignedInUser().then((data) => { | |
if (data !== null && data.email) { | |
console.log('logged in with email', data.email); | |
// logged in | |
} else { | |
// not logged in | |
} |
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
diff --git a/run b/run | |
index 9ff275b..308dd0b 100755 | |
--- a/run | |
+++ b/run | |
@@ -44,4 +44,4 @@ print "You can also try other scripts such as ./run ui/thumbnails/index.html" | |
# now let's run the cfx thingy and specify the app-kit main module | |
# as our starting point | |
-os.system("impl/bin/cfx -a xulrunner -t ./template/app-extension --static-args {\\\"browser\\\":\\\""+ browserToLaunch+"\\\"} -p \"impl/packages/chromeless\" run") | |
+os.system("impl/bin/cfx -a xulrunner -t ./template/app-extension --static-args {\\\"browser\\\":\\\""+ browserToLaunch+"\\\"} -p \"impl/packages/chromeless\" --binary /Applications/Firefox.app run") |
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/env python | |
from smtpd import SMTPChannel, SMTPServer | |
import asyncore | |
class LMTPChannel(SMTPChannel): | |
# LMTP "LHLO" command is routed to the SMTP/ESMTP command | |
def smtp_LHLO(self, arg): | |
self.smtp_HELO(arg) |
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
// default to the local dev redis environment | |
var port = 6379; | |
var host = "127.0.0.1"; | |
var password = null; | |
// Check if we're running in the hosted VCAP environment instead of the localhost dev | |
if (process.env.VCAP_SERVICES){ | |
var srv = null, credentials = null; | |
try { | |
srv = JSON.parse(process.env.VCAP_SERVICES); |
OlderNewer