This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=begin | |
Environment variables you can set: | |
MHT_HOST=domain.com ... the host to test, default is www.mangahigh.com | |
MHT_DRIVER='mechanize' ... default capybara driver to use, valid values are: | |
mechanize, | |
celerity, | |
chrome, | |
culerity, | |
selenium, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Create a fake console api, mimicing Firebug. | |
*/ | |
(function(global) { | |
var noop = function(){}; | |
if ( !global['console'] ) { | |
global.console = { | |
log : noop, | |
debug : noop, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
var div; | |
var divId = 'eg-console'; | |
var noop = function () {}; | |
var echo = function (fn, args) { | |
if (!div) { | |
div = document.createElement('div'); | |
div.setAttribute('id', divId); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery.fn.appendAt = function( content, index ) { | |
this.each(function(i, item) { | |
var $content = $(content).clone(); | |
if ( index === 0 ) { | |
$(item).prepend($content); | |
} else { | |
$content.insertAfter($(item).children().eq(index-1)); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Multiple jQuery Hell</title> | |
<script src="jquery-1.6.3.min.js"></script> | |
<script> | |
// keep a reference to jQuery 1.6.3, and clear the name from the global scope | |
jQuery163 = jQuery; | |
jQuery.noConflict(true); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
.richtext { | |
border:1px solid #000; | |
margin: 10px; | |
} | |
.richtext > span, | |
.richtext > p > span, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Authored by Pete Otaqui <pete@otaqui.com> | |
# | |
# Core code taken from StackOverflow | |
# http://stackoverflow.com/questions/372506/how-can-i-search-git-branches-for-a-file-or-directory | |
# | |
# The author has placed this work in the | |
# Public Domain, thereby relinquishing all | |
# copyrights. Everyone is free to use, modify, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
var body = document.body, | |
_standard = !!(body.requestFullScreen && document.cancelFullScreen), | |
_mz_style = !!(body.mozRequestFullScreen && document.mozCancelFullScreen), | |
_wk_style = !!(body.webkitRequestFullScreen && document.webkitCancelFullScreen), | |
_requestFullScreen, _cancelFullScreen, _fullScreenData; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
screen -t current | |
chdir $HOME | |
screen | |
screen | |
select 0 | |
altscreen on | |
#term screen-256color | |
# terminfo and termcap for nice 256 color terminal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"capabilities":[ | |
{ | |
"browserName": "internet explorer", | |
"maxInstances": 10, | |
"version": "7", | |
"seleniumProtocol": "WebDriver", | |
"platform": "WINDOWS" | |
} | |
], |