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
<?php | |
/* | |
* Available variables | |
* $query array current query from the URL | |
*/ | |
?> | |
<?php // dpm($query); ?> | |
<div id="search-products"> | |
<h2><?php echo t("Rechercher un produit");?></h2> | |
<form method="GET" id="search-form" action="catalog-search"> |
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
#!/bin/bash | |
# This script rotates the screen and touchscreen input 90 degrees each time it is called, | |
# also disables the touchpad, and enables the virtual keyboard accordingly | |
# by Ruben Barkow: https://gist.github.com/rubo77/daa262e0229f6e398766 | |
#### configuration | |
# find your Touchscreen and Touchpad device with `xinput` | |
TouchscreenDevice='Wacom ISDv4 E6 Finger touch' | |
TouchpadDevice='SynPS/2 Synaptics TouchPad' |
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
Afghanistan | |
Albania | |
Algeria | |
Andorra | |
Angola | |
Antigua & Deps | |
Argentina | |
Armenia | |
Australia | |
Austria |
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
$(document).ready(function(){ | |
$('img').error(function(){ | |
$(this).attr('src', 'http://mysite/myimage.jpg'); | |
}); | |
}); |
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
.noselect { | |
-webkit-touch-callout: none; | |
-webkit-user-select: none; | |
-khtml-user-select: none; | |
-moz-user-select: none; | |
-ms-user-select: none; | |
user-select: none; | |
} |
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
var zoomText = function (change) { | |
var fontSize, fonts, container; | |
container = $("#block-system-main"); | |
fontSize = Math.floor(parseFloat(container.css('font-size')) / 16); | |
fonts = ["1em", "1.2em", "1.4em"]; | |
if (change === -1 & fontSize > 0) { | |
fontSize--; | |
} |
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
<!doctype html> | |
<html ng-app="Time"> | |
<head> | |
<title>Time</title> | |
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.2/angular.min.js"></script> | |
</head> | |
<body> | |
<div ng-controller="MyController"> | |
<h1>{{ clock | date : 'medium' }}</h1> | |
</div> |
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
// development is a string containing the domain base of the dev site | |
// production is a string containing the domain base of the production site | |
function replaceDomains(development,production){ | |
var links = jQuery("a"); | |
for (var i = 0; i < links.length; i++) { | |
var href = jQuery(links[i]).attr("href"); | |
if ((href !== undefined) && (href.indexOf(production) > -1)) { | |
href = href.replace(production, development); | |
jQuery(links[i]).attr("href", href); | |
} |
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
def reverse(string): | |
buffer = [] | |
for char in string: | |
buffer.insert(0, char) | |
reversed = ''.join(buffer) | |
return reversed |
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
jQuery.fn.center = function () { | |
this.css("position","absolute"); | |
this.css("top", Math.max(0, (($(window).height() - $(this).outerHeight()) / 2) + $(window).scrollTop()) + "px"); | |
this.css("left", Math.max(0, (($(window).width() - $(this).outerWidth()) / 2) + | |
$(window).scrollLeft()) + "px"); | |
return this; | |
} |