Skip to content

Instantly share code, notes, and snippets.

View gnysek's full-sized avatar
💭
Kuwabara! Kuwabara!

gnysek gnysek

💭
Kuwabara! Kuwabara!
View GitHub Profile
@mynameispj
mynameispj / Props
Created July 24, 2012 14:55
Estimated reading time in PHP, by Brian Cray
Total props to Brian Cray: http://briancray.com/posts/estimated-reading-time-web-design/
@db
db / jquery.ajax.progress.js
Created May 11, 2011 12:43
add XHR2 progress events to jQuery.ajax
(function addXhrProgressEvent($) {
var originalXhr = $.ajaxSettings.xhr;
$.ajaxSetup({
progress: function() { console.log("standard progress callback"); },
xhr: function() {
var req = originalXhr(), that = this;
if (req) {
if (typeof req.addEventListener == "function") {
req.addEventListener("progress", function(evt) {
that.progress(evt);
@franz-josef-kaiser
franz-josef-kaiser / editor_plugin.js
Created April 23, 2011 18:18
Example plugin for how to add a button to tinymce in wordpress
(function()
{
tinymce.create('tinymce.plugins.BrettsYouTube',
{
init : function(ed, url) {
ed.addButton('brettsyoutube',
{
title : 'brettsyoutube.youtube',
image : 'http://localhost/wordpress/wp-includes/js/tinymce/themes/advanced/img/icons.gif',
onclick : function()