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 lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Page title</title> | |
<link rel="stylesheet" type="text/css" href="css/style.css" /> | |
</head> | |
<body> |
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/sh | |
# | |
# A hook script to switch between parameters files when checking out different branches of the same Symfony2 repo | |
# | |
# To enable this hook, rename this file to "post-checkout". | |
PREVIOUS_HEAD=$1 | |
NEW_HEAD=$2 | |
BRANCH_SWITCH=$3 |
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($) { | |
$.fn.extend({ | |
stickyWidget: function(options) { | |
// Exit if there are no elements to avoid errors: | |
if (this.length === 0) { | |
return this; | |
} | |
var settings = $.extend({ |
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
@for $i from 1 through 10 { | |
/* #{$i} item(s) */ | |
.box-ballooned-item:first-child:nth-last-child(#{$i}), | |
.box-ballooned-item:first-child:nth-last-child(#{$i}) ~ .box-ballooned-item { | |
max-width: floor(100% / $i); | |
} | |
} |
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
Show hidden characters
{ | |
"folders": | |
[ | |
{ | |
"follow_symlinks": true, | |
"path": ".", | |
"folder_exclude_patterns": [ | |
".sass-cache", | |
".bundles", | |
"node_modules", |
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
# Assuming the existence of a list of url, in a text file, get the file size of each url target (in Kb) | |
cat urls.txt | xargs -n 1 curl -sI | grep Content-Length | awk '{print $2/1000}' |
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
/** | |
* 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*/ |
OlderNewer