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
[ | |
{ | |
"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", |
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
///////////////////////////////////////////////////////////////// | |
//////////////////////////////// CPU //////////////////////// | |
///////////////////////////////////////////////////////////////// | |
# Scaleway ARM 2.99 Euro | |
# Cpu: 4 Dedicated | |
# 50 GB SSD Virtual | |
#Threads: 1 |
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
//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(); |
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
//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 : ''; |
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 | |
$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',[],[ |
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
#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 |
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
#create build folder | |
mkdir deploy | |
#download latest version | |
git clone blablabla deploy | |
#composer | |
php composer self-update | |
php composer update | |
#deploy new version | |
mv deploy / | |
#Clean |
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
#Require: Ubuntu 14.04 | |
#nginx | |
sudo apt-get update | |
sudo apt-get install nginx | |
sudo service nginx start | |
#Timezone | |
sudo dpkg-reconfigure tzdata |
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
using System; | |
using System.Collections.Generic; | |
using System.Data.Entity; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Web; | |
namespace Admin.Helpers | |
{ | |
public class IQueryablePropertyHelper |
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 | |
namespace Somewhere\Model; | |
class Upload { | |
public function __construct() {} | |
public function addFile($post_name, $directory = '/usr/share/nginx/files/') { | |
global $s3, $Log; //S3 library and Monolog |
NewerOlder