run on terminal:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew doctor
This is the example for my (ugly maybe) solution: | |
- My controller extends from DataTableController as usual, using the builder and getDisplayableColumns methods | |
class AdminUsersController extends DataTableController | |
{ | |
public function builder() | |
{ | |
return Admin::query(); | |
} |
;; Layers | |
(defun dotspacemacs/layers () | |
"Configuration Layers declaration. | |
You should not put any user code in this function besides modifying the variable | |
values." | |
(setq-default | |
;; Base distribution to use. This is a layer contained in the directory | |
;; `+distribution'. For now available distributions are `spacemacs-base' | |
;;/node/v6 or `spacemacs'. (default 'spacemacs) | |
dotspacemacs-distribution 'spacemacs |
PHP_TARGET_VERSION=5.4.32 | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 | |
echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list | |
sudo apt-get update | |
sudo apt-get install -y mongodb-org | |
wget http://ca.php.net/get/php-$PHP_TARGET_VERSION.tar.gz/from/this/mirror -O php-$PHP_TARGET_VERSION.tar.gz | |
tar -xzf php-$PHP_TARGET_VERSION.tar.gz |
server{ | |
listen 80; | |
#ssl off; | |
#ssl_certificate /etc/ssl/certs/dafitilocal.crt; | |
#ssl_certificate_key /etc/ssl/private/dafitilocal.key; | |
server_name alice.dafitilocal.com; | |
access_log /var/www/logs/local_alice.access.log; | |
error_log /var/www/logs/local_alice.error.log; |
// alice/vendor/config/dev.ini | |
;## This is the developer configuration file of Alice | |
;## On generation, this configuration will overwrite vendor/config/application.ini and local/config/application.ini | |
;## For documentation @see: /alice/vendor/config/application.ini | |
application.env="dev" | |
ns="dafitimx" |
for ($i = 0; $i < $rows; $i++) { | |
for ($j = 0; $j < $cols; $j++) { | |
if ($i == $j) { | |
$res .= $arr[$i][$j].'/n'; | |
} | |
if ($i == ($cols - $j - 1)) { | |
$res .= $arr[$i][$j]; | |
} | |
} |
#!/bin/bash | |
# @author OSOM-IT | |
echo " php switcher " | |
version=$1 | |
if [[ "70" -ne version && "56" -ne version && "0" -ne version ]] | |
then | |
echo "You must specify php version (70, 56)" | |
exit 1 else | |
if [[ "0" -ne version ]] |
$message = 'Error uploading file'; | |
switch( $_FILES['file']['error'] ) { | |
case UPLOAD_ERR_OK: | |
$message = false;; | |
break; | |
case UPLOAD_ERR_INI_SIZE: | |
case UPLOAD_ERR_FORM_SIZE: | |
$message .= ' - file too large (limit of '. ini_get('upload_max_filesize') .' bytes).'; | |
break; |
UPDATE target_table t | |
INNER JOIN ( | |
select value1, value2 | |
from another_table | |
) x | |
ON t.field_a = x.value2 | |
SET t.field_b = x.value1 |