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
# Basic | |
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get install htop | |
sudo apt-get install curl | |
#MySQL | |
sudo apt-get install mysql-server-5.6 php5-mysql | |
sudo mysql_install_db | |
sudo /usr/bin/mysql_secure_installation |
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
error_reporting(E_ALL); | |
ini_set('display_errors', 1); | |
function microtime_float() | |
{ | |
list($usec, $sec) = explode(" ", microtime()); | |
return ((float)$usec + (float)$sec); | |
} | |
$time_start = microtime_float(); |
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
$now = time(); | |
$cache_timer = get_option('frontpage_categories_box_cachetime', $now); | |
if ($cache_timer > $now) { | |
$content = get_option('frontpage_cateogires_box_content'); | |
if (empty($content)) { | |
ob_start(); | |
include 'views/frontpage_categories_box.php'; | |
$content = ob_get_clean(); | |
update_option('frontpage_cateogires_box_content', $content); | |
update_option('frontpage_categories_box_cachetime', (time() + (60 * 60))); |
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 | |
error_reporting(E_ALL); | |
ini_set('display_errors', 1); | |
define('SITE_ROOT', realpath(dirname(__FILE__))); | |
define('APP_PATH', dirname(__DIR__)); | |
session_cache_limiter(false); | |
session_start(); |
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
$error = $this->database->error(); | |
if($error[0] != "0000"){ | |
$Log->addError('Class_method('. $Helper::unpack($params).')', [$this->database->error(), $this->database->last_query()]); | |
} |
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 modals = 0; | |
function ModalAlert(title, message, confirm, success_function, size, init_ok_disabled) { | |
modals++; | |
var is_confirm_modal = (confirm !== undefined && confirm != null && confirm === true) ? true : false; | |
var size = (size !== undefined && size != null) ? ' ' + size : ''; | |
var ok_disabled = (init_ok_disabled !== undefined && init_ok_disabled != null) ? init_ok_disabled : false; | |
console.log(ok_disabled); | |
jQuery('body').append('<div class="overlay"></div>'); | |
jQuery('body').append('<div class="overlay-modal"><div class="modal"><div class="modal-dialog' + size + '"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button><h4 class="modal-title">' + title + '</h4></div><div class="modal-body"><p>' + message + '</p></div><div class="modal-footer"><button type="button" class="btn btn-default close-modal-alert" data-dismiss="modal">' + ((is_confirm_modal) ? modal_abort : modal_ok) + '</button> |
NewerOlder