Skip to content

Instantly share code, notes, and snippets.

View MTco's full-sized avatar
😞

Mathew Tyler MTco

😞
View GitHub Profile
@PixnBits
PixnBits / md5.js
Last active August 31, 2024 22:27 — forked from jhoff/md5.js
invalid reference fix
/*
* http://www.myersdaily.org/joseph/javascript/md5-text.html
*/
(function (global) {
var md5cycle = function (x, k) {
var a = x[0],
b = x[1],
c = x[2],
d = x[3];
@JamesMGreene
JamesMGreene / ZeroClipboard "Core" v2 API.md
Last active June 3, 2020 16:17
ZeroClipboard "Core" v2.0.0 API

ZeroClipboard v2.0.0 "Core" API Draft

Working draft of the API for the new ZeroClipboard "Core" sub-module in v2.0.0. This sub-module only provides the core Flash and clipboard injection facilities but none of the DOM, "Client", resizing, repositioning, etc. logic/code.

NOTE: A checked checkbox means that line item has already been implemented in the latest ZeroClipboard master branch.

API

@hasdavidc
hasdavidc / storagePolyfill.js
Last active June 9, 2020 20:55
A LocalStorage polyfill that also works in private browsing Safari (by doing window.localStorage.__proto__ = ourPolyfillObject) (where window.localStorage !== 'undefined', but has a quota of 0 and throws an error when you try to setItem)
//variant of https://gist.github.com/Contra/6368485
(function () {
var isStorageAvailable = function (storage) {
if (typeof storage == 'undefined') return false;
try { // hack for safari incognito
storage.setItem("storage", "");
storage.getItem("storage");
storage.removeItem("storage");
@drifterz28
drifterz28 / AddToWishList.html
Created December 10, 2013 06:40
Universal "Add to Amazon Wish List"
<div style="display: none;" id="AUWLBkURL.{ITEM_ID}">http://theurl.com</div>
<div style="display: none;" id="AUWLBkPrice.{ITEM_ID}">12.00</div>
<div style="display: none;" id="AUWLBkTitle.{ITEM_ID}">Test Item</div>
<div style="display: none;" id="AUWLBkImage.{ITEM_ID}">http://theimage.com/image.png</div>
<script
id="AddToAUWLButton.{ITEM_ID}"
language="JavaScript1.2"
type="text/javascript"
src="http://www.amazon.com/wishlist/bookmarklet/getbutton.js?name={ITEM_ID}&image=2">
</script>
@blech
blech / netflix-genre-crawl.py
Last active August 14, 2024 06:31
Fetch genre names from Netflix
#!/usr/bin/python
# TODO make range command line arguments
import sys, codecs
sys.stdout = codecs.getwriter('utf-8')(sys.stdout) # if your terminal can't do utf-8, well...
import time
import urllib2
import BeautifulSoup
@jhoff
jhoff / md5.js
Created November 27, 2013 18:27
Closure of Joseph's Myers md5 javascript implementation
/*
* http://www.myersdaily.org/joseph/javascript/md5-text.html
*/
(function() {
var md5cycle = function(x, k) {
var a = x[0], b = x[1], c = x[2], d = x[3];
a = ff(a, b, c, d, k[0], 7, -680876936);
@Potherca
Potherca / dabblet.css
Last active January 25, 2021 15:01
CSS Only Warning Sign
@charset "UTF-8"
@import url(http://fonts.googleapis.com/css?family=Droid+Sans|Droid+Sans+Mono);
/**
* CSS Only Warning Sign
*
* Live preview available at: http://dabblet.com/gist/6937981
*
* A lot of website use an icon of a warning sign to display next to important
* text.
@balupton
balupton / README.md
Last active October 7, 2020 19:07
The Open Information Pledge

The Open Information Pledge

I believe in the freedom of information, free as in money, and free as in freedom. That this is a fundamental requirement for empowerment.

Ideas

I understand that ideas are not copyrightable. I expect that you understand this too. I expect that we can both regard all ideas discussed to be of Public Domain, as they are.

Implementations

I understand that the implementation of ideas is copyrightable.

@yocontra
yocontra / polyfill.js
Created August 28, 2013 17:04 — forked from remy/gist:350433
LocalStorage/SessionStorage polyfill
var isStorageAvailable = function (storage) {
if (typeof storage == 'undefined') return false;
try { // hack for safari incognito
storage.setItem("storage", "");
storage.getItem("storage");
storage.removeItem("storage");
return true;
}
catch (err) {
return false;