Skip to content

Instantly share code, notes, and snippets.

View danpette's full-sized avatar

Dan-Petter Jacobsen danpette

View GitHub Profile
@danpette
danpette / ubuntu_php_upgrade_with_mongo_pecl.txt
Created July 23, 2015 15:05
Update to latest php when having mongo pecl installed on ubuntu
#Step 1
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php5-5.6
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install php5
#step 2
apt-get update
apt-get install php5-dev
<?php
$Log->addInfo('backup_daily_start');
use Aws\Glacier\GlacierClient;
use Aws\Common\Enum\Region;
use Aws\S3\S3Client;
use Ifsnop\Mysqldump as IMysqldump;
try {
$timestamp = date('Y-m-d H:i:s');
try {
$dump = new IMysqldump\Mysqldump('database', 'username', 'password', 'localhost','mysql',[],[
//Requires jquery and bootsteap 3.2+
var modal_ok = 'Confirm';
var modal_abort = 'Abort';
var ok_text = '';
var modals = 0;
function ModalAlert(title, message, confirm, success_function, size, init_ok_disabled, ok_text) {
modals++;
var is_confirm_modal = (confirm !== undefined && confirm != null && confirm === true) ? true : false;
var size = (size !== undefined && size != null) ? ' ' + size : '';
//graph1, graph2 are Chart instance
//modal is a global modal = $(this); from within $('.yourdiv').on('shown', function(event){ ....
//generateChart is method setting graph1 to new Chart.
//if dynamic/many charts make this dynamic, in this example i will always try to load both tabs, logic for only generating current should be implementet :)
$('#statistics-tabs a').click(function (e) {
e.preventDefault();
$(this).tab('show');
setTimeout(function(){
if(graph1 != undefined) graph1.destroy();
if(graph2 != undefined) graph2.destroy();
/////////////////////////////////////////////////////////////////
//////////////////////////////// CPU ////////////////////////
/////////////////////////////////////////////////////////////////
# Scaleway ARM 2.99 Euro
# Cpu: 4 Dedicated
# 50 GB SSD Virtual
#Threads: 1
[
{
"Id": "America/Scoresbysund",
"StandardName": "East Greenland Standard Time",
"DisplayName": "(UTC-01:00) East Greenland Time (Ittoqqortoormiit)",
"BaseUtcOffset": "-01:00:00",
"IsWindowsTimezone": false
},
{
"Id": "Cape Verde Standard Time",