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 ($, window) { | |
var intervals = {}; | |
var removeListener = function(selector) { | |
if (intervals[selector]) { | |
window.clearInterval(intervals[selector]); | |
intervals[selector] = 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
from MySQLdb import connect | |
conn = connect(user="[USER]", passwd= "[PASSWORD]") | |
cur = conn.cursor() | |
cur.execute("show databases;") | |
dbs_to_update = filter( | |
lambda db: db not in ('information_schema', 'mysql', 'performance_schema'), | |
[dbname[0] for dbname in cur.fetchall()]) |
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
// Keep track of the observers so we could clean up. | |
var previousObserver = null; | |
var currentObserver = null; | |
// Observe when the stream panel has changed. In Google+, the streampanel gets | |
// swapped when viewing another stream. It gets added, old one gets removed, and | |
// the new one's visibility is shown. | |
var summaryObserver = new MutationSummary({ | |
callback: handleChanges, | |
queries: [{ element: "div[guidedhelpid='streamcontent']" }] |