apt get install ntp drbd8-utils heartbeat
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
WebApp |
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 ( $ ) { | |
'use strict'; | |
$(document).ready(function() { | |
$('form').bind('submit', function() { | |
$(this).find('button[type="submit"] i').attr('class', 'glyphicon glyphicon-refresh animate'); | |
}); | |
}); | |
})( jQuery ); |
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 progressHandler(event){ | |
$("#kb_of_total").text("Uploaded "+Math.round(event.loaded/1024) +" kb of "+Math.round(event.total/1024)); | |
var percent = (event.loaded / event.total) * 100; | |
$("#progressBar").attr('value', Math.round(percent)); | |
$("#status").text(Math.round(percent)+"% uploaded... please wait"); | |
} | |
function completeHandler(event){ | |
$("#progressBar").attr('value', 100); | |
$("#status").text('Uploaded Success'); | |
successHandler(event); |
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
#element:after, .element:after { | |
content: ""; | |
display: block; | |
height: 0; | |
clear: both; | |
visibility: hidden; | |
} |
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
create database databasename; | |
create user 'user' identified by 'password'; | |
grant all privileges on databasename.* to 'user'@localhost identified by 'password'; | |
grant all privileges on databasename.* to 'user'@host; | |
grant all privileges on databasename.* to 'user'@%; |
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
public function getCacheDir() | |
{ | |
if ($this->isVagrantEnvironment()) { | |
return '/dev/shm/project/cache/'.$this->environment; | |
} | |
return parent::getCacheDir(); | |
} | |
public function getLogDir() |
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 | |
namespace Jkanclerz\DemoBundle\Payment; | |
use Symfony\Component\HttpFoundation\Request; | |
class PaymentHandler | |
{ | |
const TRANSACTION_OK = 'OK'; | |
const TRANSACTION_ERROR = 'ERROR'; |
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
#!/bin/bash | |
echo "deploy Was started" | |
hostname -f; | |
uptime; | |
for package in $@ | |
do | |
echo $package | |
if [ "$(rpm -qa | grep -E "^$package")" != "" ] |
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
class CallbackExecutor | |
{ | |
protected $callback; | |
public function __call($method, $args) | |
{ | |
if(is_callable(array($this, $method))) { | |
return call_user_func_array($this->$method, $args); | |
} | |
// else throw exception |
OlderNewer