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
apt-get install ruby-dev | |
gem install hoe | |
sudo apt-get install libxml2-dev libxslt1-dev | |
apt-get install libopenssl-ruby | |
gem install nokogiri | |
gem install mechanize |
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
// easing functions http://goo.gl/5HLl8 | |
Math.easeInOutQuad = function (t, b, c, d) { | |
t /= d/2; | |
if (t < 1) { | |
return c/2*t*t + b | |
} | |
t--; | |
return -c/2 * (t*(t-2) - 1) + b; | |
}; |
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
/* | |
I used your style, your header div, but with a slide like this | |
<section data-state="showHeader" data-header="custom head"> | |
<p>Hello</p> | |
</section> | |
*/ | |
Reveal.addEventListener( 'slidechanged', function( event ) { |
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
select channel.item.enclosure.url, channel.item.title from xml where url='http://www.vibefm.ro/podcast.xml' and channel.item.title like "%Corral%" |
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
var div = document.getElementById("demo"); | |
div.setAttribute("tabIndex", 0); | |
div.focus(); | |
div.addEventListener("keypress", function(e){ | |
console.log(e.keyCode); | |
}) |
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
javascript:(function(){var%20d=document,h=d.getElementsByTagName('head')[0],s=d.createElement('script');s.src='SRC_GOES_HERE';s.type='text/javascript';h.appendChild(s)})() |
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
/** | |
check two string respresentations of versions. | |
returns true if the version to test is equal or greater than the required minimum version | |
returns false if the test version is lower than the minimum version | |
@param {String} minVersion Minimum required version to test against | |
@param {String} testVersion Version to test | |
@return {Boolean} | |
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
//Loads CSS files into the head of the current document | |
//using arguments to reference any number of styles | |
function loadStyles(){ | |
var i = 0, | |
d = document, | |
s = d.createElement("link"), | |
h = d.getElementsByTagName('head')[0], | |
createStyle = function(src){ | |
s = s.cloneNode(false); | |
s.rel ="stylesheet"; |
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 replaceURLWithHTMLLinks(text) { | |
var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; | |
return text.replace(exp,"<a href='$1' target='_blank'>$1</a>"); | |
} |
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
/** | |
Turn a text input into a search input with added behavior | |
On focus, if input value is the same as defaultValue, replace with blank | |
On blur, if input value is empty or full of whitespace replace with defaultValue | |
@param input {HTMLInputElement} element to behave as search input | |
@param defaultValue {String} string to be default value of the input | |
**/ | |
function makeSearchInput(input, defaultValue){ | |
input.setAttribute("data-default", defaultValue); |