Skip to content

Instantly share code, notes, and snippets.

@riotera
riotera / Instructions
Last active January 24, 2016 02:27 — forked from hiryu85/bashrc
Configurazione Apache con FastCGI con più
Le porte di ascolto del fcgi per gestire le differenti versioni di PHP, devono essere impostate nel file php-fpm.conf di ogni versione.
esempio: /usr/local/etx/php/5.6/php-fpm.conf
listen = 127.0.0.1:9055
var selects = {'517111':{'201656473':{'disable':0, 'name': 'Room Only'}, '201988116':{'disable':0, 'name': 'Standalone'}}, '200003625':{'201988124':{'disable':0, 'name': 'Standard Room'}}};
var previous = [];
$.each($('.roomExpedia, .rateplanExpedia'), function(key, select) {
previous[this.id] = select.value;
});
$('.roomExpedia').change(function(){
var roomId = $(this).val();
var $this = $(this);
<select class="roomExpedia">
<option value="">--</option>
<option value="12345" class="">RoomStandard 1</option>
<option value="12346" class="">RoomStandard 2</option>
<option value="12347" class="">RoomStandard 3</option>
</select>
<select class="rateplanExpedia">
<option value="">--</option>
<option value="12345" class="">RatePlanStandard 1</option>
var XEditable = (function () {
var settings = {
undo: <?php echo ($undo) ? 'true' : 'false' ?>,
error: <?php echo $error ?>
};
var noAvailability = function(error) {
var msg = 'Alguns quartos não estão disponíveis<br>para esse período:<br><br><ul>';
jQuery.each(error, function(index, value) {
msg += '<li>' + value + '</li>';
<?php
// If you aren't using composer, register Pheanstalk class loader
//require_once 'Vendors/Pheanstalk/pheanstalk_init.php';
require_once 'vendor/autoload.php';
Class Log {
static function out($message, $newline = true) {
echo $message . ($newline ? '<br/>': ' ');
}
@riotera
riotera / gist:2208437
Created March 26, 2012 18:19
Comandi Git
Crea nuovo branch, fa il checkout e importa la branch remota:
git checkout -b test origin/test
--------------
Resetta il repo ad un certo commit (elimina lo storico precedente e gli eventuali uncommit)
git reset --hard <hash>
@riotera
riotera / gist:2199649
Created March 25, 2012 20:50
Array stanze
Array
(
[166] => Array
(
[id] => 166
[hotel_id] => 93
[model] => Hotel
[foreign_key] => 93
[parent_id] =>
[name] => Quarto Individual