See linux-commands-for-setting-up-lamp-on-ubuntu-1604-mint18.sh for how to set up apache, mysql and php
- Apache
- Atom
- Bleachbit
- Curl
- Composer
- Dbeaver
- Disk Usage Analyzer
- Gimp
- Git
<?php | |
ini_set('memory_limit', '1024M'); | |
function test(){ | |
$index = 0; | |
//Case 1 | |
$a = ''; |
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge |
# Make sure you have already installed apache and mysql; | |
# install rails | |
# https://help.ubuntu.com/lts/serverguide/ruby-on-rails.html | |
sudo apt install rails | |
# install comman dependencies | |
sudo apt-get install build-essential patch ruby-dev zlib1g-dev liblzma-dev make libmysqlclient-dev imagemagick \ | |
libmagickcore-dev libmagickwand-dev |
<?php | |
function formatSizeUnits($bytes) | |
{ | |
if ($bytes >= 1073741824) | |
{ | |
$bytes = number_format($bytes / 1073741824, 2) . ' GB'; | |
} | |
elseif ($bytes >= 1048576) | |
{ | |
$bytes = number_format($bytes / 1048576, 2) . ' MB'; |
Go to => Handing JSON data errors in Slim 3
<?php | |
$phpword_writer_wrapper = new \Promis2\PhpWordWriterWrapper(); | |
// New Word document | |
$phpWord = new \PhpOffice\PhpWord\PhpWord(); | |
// Do stuff with $phpWord | |
// ............ | |
// ............ |
// see also https://stackoverflow.com/questions/359788/how-to-execute-a-javascript-function-when-i-have-its-name-as-a-string | |
window.example = function () { alert('hello world'); }; | |
//or | |
name = 'example'; | |
window[name] = function () { alert('hello world'); }; | |
//or | |
window[name] = new Function( 'alert("hello world")' ); |
<?php | |
/** | |
* | |
* A collection of Cfs_Model_Base_Record records. | |
* @package Cfs_Model | |
* | |
*/ | |
class Cfs_Model_Base_Collection extends Solar_Sql_Model_Collection { | |
/** |