This file contains hidden or 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
/*paste this code in the footer*/ | |
<script> | |
window.onscroll = function() { | |
var el = document.getElementById('headerWrapper'); // rename with your header wrapper id | |
if(window.pageYOffset > 1) { | |
//sticky header | |
el.classList.add("sticky"); | |
} else { | |
//normal header | |
el.classList.remove("sticky"); |
This file contains hidden or 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
Install one of these extension packages | |
- Chrome extension https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei/related | |
- Firefox http://download.livereload.com/2.0.8/LiveReload-2.0.8.xpi | |
- Safari http://download.livereload.com/2.0.9/LiveReload-2.0.9.safariextz | |
configure | |
- if you want to use it with local files (or vagrant), be sure to enable “Allow access to file URLs” checkbox in Tools > Extensions > LiveReload after installation | |
In your terminal run: | |
- grunt watch |
This file contains hidden or 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
#Force non-www: | |
RewriteEngine on | |
RewriteCond %{HTTP_HOST} ^www\.example\.com [NC] | |
RewriteRule ^(.*)$ http://example.com/$1 [L,R=301] |
This file contains hidden or 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
alias heroku="/cygdrive/c/Program\ Files\ \(x86\)/Heroku/bin/heroku.bat" |
This file contains hidden or 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%20t;if%20(window.getSelection)%20t%20=%20window.getSelection();else%20if%20(document.selection)%20t%20=%20document.selection.createRange();if%20(t.text%20!=%20undefined)%20t%20=%20t.text;if(!t%20||%20t%20==%20""){%20a%20=%20document.getElementsByTagName("textarea");%20for(i=0;%20i<a.length;%20i++)%20{%20%20if(a[i].selectionStart%20!=%20undefined%20&&%20a[i].selectionStart%20!=%20a[i].selectionEnd)%20%20{%20%20%20%20t%20=%20a[i].value.substring(a[i].selectionStart,%20a[i].selectionEnd);%20%20%20%20break;%20%20}%20}}if(!t%20||%20t%20==%20"")alert("please%20select%20some%20text");else%20alert("word%20count:%20"%20+%20t.toString().match(/(\S+)/g).length+"%20chars:"+t.toString().length);})() |
This file contains hidden or 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
/** | |
* excerpt char count | |
* qtranslate compatible | |
* just cut&paste in your functions.php | |
* author: http://somosf5.com | |
*/ | |
function excerpt_count_js(){ | |
$languajes=array('es'); |
This file contains hidden or 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 links=document.getElementsByTagName("link");var neededElements=[];var reg=/\/wp-content\/themes\/(.)+\/style\.css/;var themeStyle="";for(var i=0,length=links.length;i<length;i++)if(links[i].rel.indexOf("stylesheet")>=0)if(links[i].href.match(reg))themeStyle=links[i].href;if(themeStyle===""){alert("Vaya parece que la web actual no est\u00e1 construida con WordPress");return false;}var txtFile=new XMLHttpRequest;txtFile.open("GET",themeStyle,true);txtFile.onreadystatechange=function(){if(txtFile.readyState===4)if(txtFile.status===200){allText=txtFile.responseText;themeName=allText.match(/theme name:(.)+/i)||{};themeURI=allText.match(/theme URI:(.)+/i)||{};description=allText.match(/Description:(.)+/i)||{};author=allText.match(/Author:(.)+/i)||{};authorURI=allText.match(/Author URI:(.)+/i)||{};version=allText.match(/Version:(.)+/i)||{};tags=allText.match(/Tags:(.)+/i)||{};alert(themeName[0]+"\n"+themeURI[0]+"\n"+description[0]+"\n"+author[0]+"\n"+authorURI[0]+"\n"+version[0]+"\n"+tags[ |
This file contains hidden or 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(){host=window.location.hostname;window.open("http://"+host+"/wp-admin");})() |