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 | |
/** | |
* Doctrine library for CodeIgniter | |
*/ | |
use Doctrine\ORM\Tools\Setup; | |
use Doctrine\ORM\EntityManager; | |
class Doctrine { |
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
/** | |
* FB Extended | |
* Jose Luis Quintana <www.joseluisquintana.pe> | |
* Reference: https://developers.facebook.com/docs/javascript/reference/FB.api | |
*/ | |
function FbApiHandler(options, fn) { | |
var ready = false; | |
this.options = null; | |
this.response = 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
/* | |
* Default Media Queries Screen | |
* Based on purecss.io | |
*/ | |
/* Small Sreen / ≥ 568px */ | |
@media screen and (max-width: 35.5em) { | |
} |
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 | |
function random_string($length = 10) { | |
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; | |
$randomString = ''; | |
for ($i = 0; $i < $length; $i++) { | |
$randomString .= $characters[rand(0, strlen($characters) - 1)]; | |
} | |
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 myfunction(param) { | |
return (param === undefined) ? true : param; | |
} | |
/* Testing 'myfunction' in console.. | |
// Default value example | |
> myfunction(); | |
true |
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 | |
/** | |
* Class for Ajax request and response data structure | |
* @author Jose Luis Quintana <joseluisquintana20@gmail.com> | |
*/ | |
class FacebookCustom { | |
private $env; | |
private $app_id; |
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
/* | |
name: uSizer | |
description: Useful class for resize DOM objects | |
license: MIT-Style License <http://joseluisquintana.pe/license.txt> | |
copyright: Jose Luis Quintana <http://joseluisquintana.pe/> | |
authors: Jose Luis Quintana <joseluisquintana20@gmail.com> | |
*/ | |
function uSizer(parent, child) { | |
this.version = '1.0'; | |
this.child = 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
jQuery.fn.shuffleChildren = function(){ | |
var p = this[0]; | |
for (var i = p.children.length; i >= 0; i--) { | |
p.appendChild(p.children[Math.random() * i | 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
// main.js | |
(function($){ | |
/** | |
For example: | |
You might load pages for each links on your menu. | |
Eg. | |
<ul> | |
<li><a href="#about">About</a></li> |
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 | |
function excel_encoding_string($string) { | |
return mb_convert_encoding($string, 'UTF-16LE', 'UTF-8'); | |
} |