Skip to content

Instantly share code, notes, and snippets.

View PaulSpoerry's full-sized avatar
:octocat:
Work work work work work...

Paul Spoerry PaulSpoerry

:octocat:
Work work work work work...
View GitHub Profile
@PizzaBrandon
PizzaBrandon / jquery.waituntilexists.js
Last active August 24, 2023 14:23 — forked from buu700/jquery.waituntilexists.js
Updated waitUntilExists plugin
;(function ($, window) {
var intervals = {};
var removeListener = function(selector) {
if (intervals[selector]) {
window.clearInterval(intervals[selector]);
intervals[selector] = null;
}
@miratcan
miratcan / fix_database_to_utf8.py
Last active August 31, 2023 00:06
Small python script that converts character sets to utf8 in all databases and tables. My solution for "Illegal mix of collations" errors. (http://stackoverflow.com/questions/3029321/how-to-solve-illegal-mix-of-collations-in-mysql)
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()])
@mohamedmansour
mohamedmansour / plus-injection.js
Created April 14, 2012 05:28
MutationSummary example for MutationObservers
// 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']" }]