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> | |
<title>Auto-fit background image script</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script> | |
<style> | |
html,body{ | |
padding:0; | |
margin:0; | |
height:100%; |
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($){ | |
$(document).ready(function(){ | |
$("*[data-ui-widget]").each(function(){ | |
$this = $(this); | |
switch($this.data("ui-widget")){ | |
case "button":{ | |
$this.button($this.data("ui-widget-options")); | |
}break; | |
case "datepicker":{ | |
$this.datepicker($this.data("ui-widget-options")); |
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 | |
/** | |
* PHP function for grouping elements in a loop | |
* @param int $times Group max items | |
* @param array $items | |
* @param string $html_before Group start html | |
* @param string $html_after Group close html | |
* @param string $fn Callable function name that generates the item HTML | |
* @param int $offset |
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
datetools = { | |
"inDateRange":function(date, time_from, time_to){ | |
if(isNaN(time_from) || isNaN(time_to)){ | |
return false; | |
} | |
var dfrom = new Date(parseInt(time_from)*1000); | |
var dto = new Date(parseInt(time_to)*1000); | |
dto = new Date(dto.getFullYear(), dto.getMonth(), dto.getDate(), 23, 59, 59); | |
var now = date.getTime(); |
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
/* | |
* Sample: | |
* HTML: | |
* <div data-template="greeting">hi, {{name}}</div> | |
* | |
* JavaScript: | |
* $("div").tpl("greeting", {'name':'Paul'}); | |
*/ | |
$.fn.tpl = function(name, vars, partials){ | |
return $(this).tplParse($('*[data-template="' + name + '"]:first').html(), vars, partials); |
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 | |
abstract class Record_Iterator_Abstract implements Iterator, Countable | |
{ | |
/** | |
* | |
* @var string The record class (model) | |
*/ | |
protected $recordClass; |
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
<!-- DEMO: http://jsfiddle.net/javieranid/Dpgba/1/ --> | |
<label class="btn btn-file btn-mini"> | |
<input type="file" /> <span>Examinar</span> | |
</label> | |
<style> | |
.btn-file{ | |
position:relative; | |
overflow: hidden; |
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" /> | |
<title>htaccess redirect generator</title> | |
<style> | |
html,body{ | |
font-size:14px; | |
color:#222; | |
margin:0; |
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
/** | |
* | |
* Script for loading and caching commit history | |
* | |
*/ | |
! function(root, $) { | |
/** | |
* Fetch latest commits from Github API and cache them | |
* @link https://gist.github.com/4520294 | |
* |
OlderNewer