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
<?php | |
/* Sets classes such as "first", "last", "odd", "even" and "active" | |
* @param $articles An array of articles to count | |
* @param $index The index to watch for | |
* @param $currentArticle The index of the current article | |
* @return string | |
**/ | |
function setCSSClasses($index = null, $articles = null, $currentArticle = null) { |
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
opacity: .75; | |
filter: alpha(opacity=75); | |
-ms-filter: "alpha(opacity=75)"; | |
-khtml-opacity: .75; | |
-moz-opacity: .75; |
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 whichTransitionEvent(){ | |
var t; | |
var el = document.createElement('fakeelement'); | |
var transitions = { | |
'transition':'transitionend', | |
'OTransition':'oTransitionEnd', | |
'MozTransition':'transitionend', | |
'WebkitTransition':'webkitTransitionEnd' | |
} |
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
<?php $favicon_path = "/docroot/img/ico/"; ?> | |
<!-- Default --> | |
<link rel="shortcut icon" href="<?php echo $favicon_path; ?>favicon.ico"/> | |
<!-- For IE6+ --> | |
<link rel="shortcut icon" href="<?php echo $favicon_path; ?><?php echo $favicon_path; ?>favicon.ico" type="image/x-icon"> | |
<!-- For IE6+ --> | |
<link rel="shortcut icon" href="<?php echo $favicon_path; ?>favicon.ico"> |
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
/** | |
* This casper scipt checks for 404 internal links for a given root url. | |
* | |
* Usage: | |
* | |
* $ casperjs 404checker.js http://mysite.tld/ | |
* $ casperjs 404checker.js http://mysite.tld/ --max-depth=42 | |
*/ | |
/*global URI*/ |
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
<div id="fb-root"></div> | |
<script type="text/javascript"> | |
var goTo = true; | |
function goToLogIn() { | |
if (goTo) { | |
self.location = "{{ path('facebook_security_check') }}"; | |
} | |
} | |
window.fbAsyncInit = function() { | |
FB.init({ |
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
// init rollovers on images | |
imgRollover: function() { | |
var $app = this; | |
$.each($app.$hoverable, function(index, val) { | |
var $this = $(this); | |
// if the hoverable object is <img> | |
if (typeof $this === 'object' && $this.is("img")) { |
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
// find all anchor tags without 'title' attribute | |
<a\s+((class|id|href|)="[^"]+"\s*)+/?> | |
// find all img tags without 'alt' attribute | |
<img\s+((width|height|border|class|id|src|usemap|hspace|vspace)="[^"]+"\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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title>Facebook batch photo download</title> | |
<meta name="description" content="This script will hopefully last longer than other apps. At lest until FB will change their damnd API again"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css"> | |
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-theme.min.css"> |
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 vimeoRegexp = /(?:https?\:)?\/\/(?:www\.|player\.)?vimeo.com\/(?:video\/|channels\/|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|)(\d+)(?:$|\/|\?)/; | |
var vimeoVideoUrl = "//player.vimeo.com/video/2243632"; | |
var vimeoVideoArray = vimeoRegexp.regexp(vimeoVideoUrl); | |
var vimeoVideoID = vimeoVideoArray[3]; |
OlderNewer