Skip to content

Instantly share code, notes, and snippets.

View lucidBrot's full-sized avatar

Eric Mink lucidBrot

View GitHub Profile
@HaiyangXu
HaiyangXu / Server.py
Created May 18, 2014 14:00
A simper python http server can handle mime type properly
# -*- coding: utf-8 -*-
#test on python 3.4 ,python of lower version has different module organization.
import http.server
from http.server import HTTPServer, BaseHTTPRequestHandler
import socketserver
PORT = 8080
Handler = http.server.SimpleHTTPRequestHandler
@sfrdmn
sfrdmn / image_downloader.js
Last active January 8, 2024 03:39
Bookmarklet to download all images on a page
;(function() {
var images = [].slice.call(document.querySelectorAll('img'))
try {
images.forEach(function(img) {
downloadImage(img)
})
} catch (e) {
alert("Download failed.");
console.log('Download failed.', e);
}
@RonnyO
RonnyO / jquery.qDefer.min.js
Created April 15, 2012 11:24
Simply mimic the 'defer' attribute for inline scripts across all browsers (jQuery helper)
// http://bit.ly/qDefer
$(function(){$('script[type="text/javascript/defer"]').each(function(){$(this).clone().attr('type','').insertAfter(this)})});