run on terminal:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew doctor
// Redirect.js | |
// Original from: Zahir Gudiño - http://gplus.to/zgudino | |
// Use: | |
// var redirect = new redirect('302', 'Upps, the site was moved!'); | |
// redirect.to('http://new-url-to-redirect').run(2000); | |
// | |
function Redirect(err, msg) { | |
this.httpstatus = err; | |
this.message = msg; |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>tableToExcel Demo</title> | |
<script src="tableToExcel.js"></script> | |
</head> | |
<body> | |
<h1>tableToExcel Demo</h1> | |
<p>Exporting the W3C Example Table</p> |
<?php | |
// $ruta is the path to folder, use the correct octal value in your case... | |
exec ("find $ruta -type d -exec chmod 0777 {} +"); | |
exec ("find $ruta -type f -exec chmod 0777 {} +"); |
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 |
$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; |
#!/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 ]] |
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]; | |
} | |
} |
// 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" |
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; |