Skip to content

Instantly share code, notes, and snippets.

View irae's full-sized avatar

Irae Carvalho irae

View GitHub Profile
@irae
irae / compatibility.py
Created July 4, 2011 09:20 — forked from jcarbaugh/compatibility.py
Django middleware for X-UA-Compatible HTTP header
# Copyright (c) 2009, Sunlight Foundation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
@irae
irae / _Stay_standalone.md
Last active January 29, 2024 12:38 — forked from kylebarrow/example.html
Stay Standalone: Prevent links in standalone web apps opening Mobile Safari

#Stay Standalone

A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.

/*
* Copyright (c) 2010 Tobias Schneider
* This script is freely distributable under the terms of the MIT license.
*/
(function(){
var UPC_SET = {
"3211": '0',
"2221": '1',
"2122": '2',
@irae
irae / gist:370058
Created April 18, 2010 07:03 — forked from remy/gist:368657
function addEvent(el, type, fn) {
el.addEventListener(type, fn, false);
return function (type, fn) {
return addEvent(el, type, fn);
};
}
// So I can do this:
addEvent(document.getElementsByTagName('img')[0], 'dragend', logEvent)('dragstart', logEvent);
// ==UserScript==
// @name Inventário do brute
// @namespace La e My Brute
// @description Adiciona a opção de visualizar o inventário do adversário na arena
// @include http://*.labrute.com/arene
// @include http://*.mybrute.com/arene
// ==/UserScript==
// Add jQuery
var GM_JQ = document.createElement('script');