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
# This script is used to deploy a Meteor 0.9 project to Modulus.io hosting using CodeShip. | |
# Install Meteor. | |
curl https://install.meteor.com > ./install_meteor | |
sed -i'' -e 's/PREFIX=.*/PREFIX="$HOME"/g' ./install_meteor | |
chmod u+x ./install_meteor | |
./install_meteor | |
# Install Modulus. | |
npm install -g modulus |
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
// Setting up Raven and Meteor on the CLIENT side. | |
var clientDSN = 'https://<key>@app.getsentry.com/30405'; | |
Raven.config(clientDSN, {}).install(); | |
// Set the user automatically. | |
Meteor.autorun(function() { | |
var user = Meteor.user(); | |
if (!user) Raven.setUser( /* Unset */ ); | |
else { |
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
drawMultiTimingChart('draft-timings', 'last_14_days', 'daily', [ | |
['deleting a gmail draft', 'duration', 'Deleting a draft'], | |
['updating a gmail draft', 'duration', 'Updating a draft'], | |
['creating a gmail draft', 'duration', 'Creating a draft'], | |
]); | |
// Draw multiple lines in the same chart. | |
// See https://github.com/keen/keen-js/blob/master/docs/recipes.md#combine-two-line-charts |
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
/** | |
* Provides a fake analytics object that sends all calls to the analytics bridge. Why do we use | |
* an analytics bridge? Well, we can't load Segment's analytics snippet in this extension source or | |
* in the chrome extension content script because it will conflict with the Gmail DOM. By loading a standalone file (hosted | |
* by the app), we can sandbox Segment and its dependencies away from Gmail, while providing a | |
* postMessage bridge to be able to call its methods. | |
*/ | |
var analytics = (function() { | |
var loaded = false; | |
var eventQueue = []; |
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
Accounts.onLogin(function(e) { | |
// Do this async so we don't block login. | |
Meteor.setTimeout(function() { | |
var userId = e.user._id; | |
maybeSyncGoogleContacts(userId); | |
}, 100); | |
}); |
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
Accounts.onLogin(function(e) { | |
// Do this async so we don't block login. | |
Meteor.setTimeout(function() { | |
var userId = e.user._id; | |
maybeSyncGoogleContacts(userId); | |
}, 100); | |
}); |
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 $initHighlight(block, flags) { | |
try { | |
if (block.className.search(/\bno\-highlight\b/) != -1) | |
return processBlock(block.function, true, 0x0F) + ' class=""'; | |
} catch (e) { | |
/* handle exception */ | |
var e4x = | |
<div>Example | |
<p>1234</p></div>; | |
} |
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
test |
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 fib(n) { | |
return function(n, a, b) { | |
return n > 0 ? arguments.callee(n - 1, b, a + b) : a; | |
}(n, 0, 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
<!doctype html> | |
<html> | |
<head> | |
<script src="script.js"></script> | |
</head> | |
<body> | |
<button id="hello">Hello</button> | |
</body> | |
</html> |
OlderNewer