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
<slideshow> | |
<img src="//lorempixel.com/670/401" alt="img-1" /> | |
<img src="//lorempixel.com/670/400" alt="img-2" /> | |
<img src="//lorempixel.com/670/399" alt="img-3" /> | |
</slideshow> |
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 | |
define('SESSION_TIMEOUT', '1800'); // 30 minutes | |
session_name('fuckIE'); | |
session_start(); | |
// ...bla bla | |
if (isset($_SESSION['last_activity']) && (time() - $_SESSION['last_activity'] > SESSION_TIMEOUT)) { |
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
// requires mootools-core bind function | |
function FCKeditor_OnComplete(editorInstance){ | |
editorInstance.EditorDocument.addEventListener('keypress', checkCharacters.bind(editorInstance)); | |
} | |
function checkCharacters(e) { |
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 | |
// I use here Jeff's db methods | |
public function getTree($registry, $parent=0) { | |
$child_rows = $registry->db->autoSelect("id", TABLE, "parent='$parent'", "name"); | |
$children = array(); |
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
video.fp_setPlaylist = function(playlist) { | |
log("Setting playlist"); | |
activeIndex = 0; | |
for ( var i = 0; i < playlist.length; i++ ) { | |
if(typeof playlist[i].url != 'undefined') playlist[i] = fixClip(playlist[i]); | |
} | |
activePlaylist = playlist; | |
// keep flowplayer.js in sync |
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
"use strict"; | |
var numberStringToText; | |
(function() { | |
var dict = { | |
'0': ' ', | |
'00': '0', | |
'1': '1', | |
'11': ',', | |
'111': '.', | |
'1111': ':', |
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
**in topBar phpModuleView** | |
================================= | |
$encode = true; | |
if($_SERVER['REQUEST_URI'] == '/index.php') { | |
$ubase = $_SERVER['REQUEST_URI']."?textview="; | |
$encode = false; | |
} | |
elseif(substr($_SERVER['SCRIPT_URL'], -1) == '/') { | |
$ubase = $_SERVER['REQUEST_URI']."?"; | |
} |
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
GENERAL | |
================= | |
Two machines, 1 server and 1 client | |
The backoffice and frontend applications resides on the server | |
SERVER | |
================= | |
Suppose the server ip on the local netw is 192.168.0.74 | |
ls -la /var/ape |
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
.mootab .tab_contents { | |
border: 1px solid #eee; | |
padding: 10px; | |
} | |
.mootab .tab_titles .link { | |
cursor: pointer; | |
display: inline-block; | |
border:1px solid #eee; | |
border-bottom-width: 0; | |
padding: 2px 5px; |
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
// new namespace | |
var tcg = {}; | |
// main graph controller | |
tcg.graph = new Class({ | |
options: { | |
x_grid_step: 20, // grid step in px on x axis | |
y_grid_step: 40, // grid step in px on y axis | |
x_factor: 1, // multiplier factor of each grid step on x axis (value = m * grid-steps) |