Skip to content

Instantly share code, notes, and snippets.

View Javlopez's full-sized avatar

Javier Lopez Lopez Javlopez

View GitHub Profile
@Javlopez
Javlopez / FilterFloat in Javascript.html
Created April 27, 2011 16:23
Filtro simple de numeros floats validos
<script type="text/javascript">
<!--
function filterFloat(evt){
// Backspace = 8, Enter = 13, ‘0′ = 48, ‘9′ = 57, ‘.’ = 46, ‘-’ = 43
var key = window.Event ? evt.which : evt.keyCode;
if(key >= 48 && key <= 57){
return true;
}else{
if(key == 8 || key == 13 || key == 46) {
@Javlopez
Javlopez / filter.html
Created April 27, 2011 17:46
Solo numeros con 1 punto y maximo dos decimales
<script type="text/javascript">
<!--
function filterFloat(evt,input){
// Backspace = 8, Enter = 13, ‘0′ = 48, ‘9′ = 57, ‘.’ = 46, ‘-’ = 43
var key = window.Event ? evt.which : evt.keyCode;
var chark = String.fromCharCode(key);
var tempValue = input.value+chark;
if(key >= 48 && key <= 57){
if(filter(tempValue)=== false){
return false;
var $selector = $(".combos");
$selector.change(function () {
var $this = $(this);
var $id = this.id;
var elegido=$(this).val();
var combo = $id.toString().split("combo")[1];
var params = {elegido: elegido};
if($id == "combo3"){
@Javlopez
Javlopez / gist:1004915
Created June 2, 2011 17:59
quesera.txt
<97><C7><0E><C4><C6><11>D<7F><C5>7I<E0><81>9<C1><96><05>r<99>sZ<A6><8B><C1><9C>s<E6><D7>{<0F>}<9C><E9><C1><A0><EA>u<F5>?<FF><FD><CF>?<FF>*<CE><A4><FF><B3>z<9B><B1><EC><93><BD><F8>3M<B6><82><C0><FE><97><17><D9><94><17><7F><FE><C1><C5><05><BA>m<01><93>}
<F0><8E><91>.<CA><04>=<9C><B0>=<C1><EB><F7><1D>.<EA><E5><FA><B1>\<E1><F2>t<03><86><01>n<10><<F3>_<19>%<1E><7F>M<90>x<C0>|YD<FA><D3><82>C<E2><93>n<C0><81>><EE><E1><A1><E2><81><A0>\<D8><02><A3>B3<EA><1D><C7>] <13>S~Up<B2>M<A9><A7><D2><F2><15>/`<19>Q<C8><F1><A3>p<D4>o<F6>I<AA>Y<17><AA><9A>R<AB><B5><E1><DA><CD>0<AA><E3><10>e<E2><DC><A6>`<11><1C><FE><FC>&<9C><84>)<B2><E5><FB><BA>.t<D3><F2><A9><EF>vvk<FC><E2>Q<FD><91><9C>$~<8F><<94>U<9F><F2><EA><A6><98>xn2;<D2><C6><C9>Z<E6>I`W<0B><AF><98><83><A0><DF>H1 <F0><01>R<8B><DE><A8>v<CF>hlK<17><95>b<EC><B0><83><FC><1E><16><F9>E<1A><9D>z"<D5><D8><9E><D3><88><1C><EC><88>
<CD><91><80>Vr<0C><A2>T}O<19>
+<BC><E8>U<18>E~<D3><FC><A1>]<9B><BD><DB><0B><B2><D6><97><96><A5><16><14><BC>>
<B7><14>@d<1B>
<E7>i
<A6>xM5<E2>,<D9>I
)/<1E><94><
// no direct access
<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
/**
* @package Joomla
* @subpackage Config
*/
class TOOLBAR_config
<?php
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
require_once( JApplicationHelper::getPath( 'toolbar_html' ) );
switch ($task)
{
default:
<?php
//.............
/**
* Enable modules. Modules are referenced by a relative or absolute path.
*/
Kohana::modules(array(
// 'auth' => MODPATH.'auth', // Basic authentication
// 'cache' => MODPATH.'cache', // Caching with multiple backends
// 'codebench' => MODPATH.'codebench', // Benchmarking tool
'database' => MODPATH.'database', // Database access
@Javlopez
Javlopez / bootstrap.php
Created June 20, 2011 04:09
Modificacion del bootstrap
<?php
//...
Kohana::modules(array(
'A1' => MODPATH.'a1', // Authentication Module
'A2' => MODPATH.'A2', // A2 Autorization Module
'ACL' => MODPATH.'ACL', // ACL Zend
//...
));
@Javlopez
Javlopez / bootstrap.php
Created June 20, 2011 04:24
Modificacion del bootstrap
<?php
/**
* Enable modules. Modules are referenced by a relative or absolute path.
*/
Kohana::modules(array(
'A1' => MODPATH.'a1', // Authentication Module
'A2' => MODPATH.'A2', // A2 Autorization Module
'ACL' => MODPATH.'ACL', // ACL Zend
'email' => MODPATH.'email', // Email module
@Javlopez
Javlopez / a2.php
Created June 20, 2011 04:28
A2 config file of module
<?php
return array(
/*
* The Authentication library to use
* Make sure that the library supports:
* 1) A get_user method that returns FALSE when no user is logged in
* and a user object that implements Acl_Role_Interface when a user is logged in
* 2) A static instance method to instantiate a Authentication object