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
javascript:let dest=prompt("Issue ID?");if (dest) window.open("https://[subdomain].atlassian.net/browse/" + dest, '_blank'); | |
// or | |
javascript:const tab = window.open('about:blank', '_blank');tab.document.write("<script>window.location.href=`https://[subdomain].atlassian.net/browse/${window.prompt('number')}`</script>");tab.document.close(); |
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 Bull = require('bull'); | |
var queue = new Bull('contacts', 6383, 'localhost'); | |
var concurrency = process.argv[2] ? parseInt(process.argv[2]) : 1; | |
function handler(job, done) { | |
console.log('processing job', job.jobId); | |
setTimeout(() => { | |
done(); |
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
db.sequences.aggregate([ | |
{ | |
"$match": { | |
$text: { $search: 'test' } | |
} | |
}, | |
{ | |
$sort: { | |
score: { $meta: "textScore" }, | |
_id: -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
/** | |
* This script will automatically sync all updates from one database to another. It is meant to be run while | |
* syncing the database using mongodump and mongorestore. | |
* | |
* Example: | |
* node livesync.js mongodb://<user>:<pass>@dbhost.com:10645/app-production \ | |
* mongodb://<user>:<pass>@dbhost.com:10499/local?authSource=app-production \ | |
* app-production \ | |
* mongodb://<user>:<pass>@newdbhost.com/app-prod | |
*/ |
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 lacona = require('lacona'); | |
var laconaPhrase = require('lacona-phrase'); | |
var datetime = require('lacona-phrase-datetime'); | |
var string = require('lacona-phrase-string'); | |
var parser = new lacona.Parser({ | |
grammar: laconaPhrase.createElement('sequence', { | |
children: [ | |
laconaPhrase.createElement('literal', { | |
text: 'remind me to ' | |
}), |
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
/** | |
* | |
*/ | |
$(window).on('message', function(e) { | |
var data = e.originalEvent.data; | |
if (data.method !== 'createIFrame') return; | |
var proxyUrl = chrome.runtime.getURL('/src/iframeProxy/proxy.html'); |
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
/** | |
* Run this by downloading this script to your computer, then: | |
* 1. $ npm install express | |
* 2. $ node thisscript.js | |
* 3. Open localhost:8030/nocache and then localhost:8030/nostore | |
*/ | |
var app = require('express')(); | |
app.get('/nocache', function(req, res) { |
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 async src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.2/moment.min.js"></script> | |
<script async src="https://d14s452uta6ylv.cloudfront.net/63f05514e61391320f7915439f20f128a86c2ac5/lib/chrono.min.js"></script> |
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 src="//code.jquery.com/jquery-2.1.3.min.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.7.0/underscore-min.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/backbone.js/1.1.2/backbone-min.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/3.0.2/handlebars.runtime.min.js"></script> | |
<!-- Our application Javascript --> | |
<script src="https://d14s452uta6ylv.cloudfront.net/63f05514e61391320f7915439f20f128a86c2ac5/build.js"></script> |
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 timing = window.performance.timing; | |
keen.addEvent('page load time to first byte', { | |
ttfb: timing.responseStart - timing.connectEnd | |
}); |
NewerOlder