This file contains 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 | |
// como é atualmente | |
$a = ['um', 'dois', 'tres', 'quatro']; | |
echo implode (',', $a); | |
// Conceito 1 | |
// $params = new paramClass(); |
This file contains 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
RewriteEngine On | |
RewriteCond %{HTTPS} !=on | |
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] |
This file contains 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 | |
function __autoload($classe) | |
{ | |
if(file_exists(APP_PATH.'/core/classes'.$classe.'.php')) | |
{ | |
require(APP_PATH.'/core/classes'.$classe.'.php'); | |
add_log_event(SUCCESS, 'Classe '.$classe.' instanciada com sucesso pelo core'); | |
} | |
else if(file_exists(APP_PATH.'/libs/'.$classe.'.php')) |
This file contains 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
RewriteEngine on | |
RewriteCond %{HTTP_HOST} ^example.com [NC,OR] | |
RewriteCond %{HTTP_HOST} ^www.example.com [NC] | |
RewriteRule ^(.*)$ http://example.net/$1 [L,R=301,NC] |
This file contains 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 | |
/** | |
* Simple pageview class. | |
* | |
* Usage: | |
* \Counter::register(); | |
* \Counter::getStatus(); | |
* | |
* @author Joubert <me@redrat.com.br> | |
*/ |
This file contains 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
015-01-07 01:03:12.611+0000: starting up | |
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin QEMU_AUDIO_DRV=none /usr/libexec/qemu-kvm -name instance-00000003 -S -machine pc-i440fx-rhel7.0.0,accel=kvm,usb=off -cpu SandyBridge,+erms,+smep,+fsgsbase,+rdrand,+f16c,+osxsave,+pcid,+pdcm,+xtpr,+tm2,+est,+smx,+vmx,+ds_cpl,+monitor,+dtes64,+pbe,+tm,+ht,+ss,+acpi,+ds,+vme -m 512 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid 87f92892-e39c-4c3a-a0e6-f38d2546b6f0 -smbios type=1,manufacturer=Fedora Project,product=OpenStack Nova,version=2014.2.1-1.el7.centos,serial=2d406ad2-c45e-4e1b-86f1-1fa56e394d32,uuid=87f92892-e39c-4c3a-a0e6-f38d2546b6f0 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/instance-00000003.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc,driftfix=slew -no-kvm-pit-reinjection -no-hpet -no-shutdown -boot strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/var/lib/nova/instances/87f92 |
This file contains 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
2015-01-07 01:42:45.747+0000: starting up | |
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin QEMU_AUDIO_DRV=none /usr/libexec/qemu-kvm -name instance-00000006 -S -machine pc-i440fx-rhel7.0.0,accel=kvm,usb=off -cpu SandyBridge,+erms,+smep,+fsgsbase,+rdrand,+f16c,+osxsave,+pcid,+pdcm,+xtpr,+tm2,+est,+smx,+vmx,+ds_cpl,+monitor,+dtes64,+pbe,+tm,+ht,+ss,+acpi,+ds,+vme -m 512 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid 74076b2b-b195-4506-8b89-b86023e390c6 -smbios type=1,manufacturer=Fedora Project,product=OpenStack Nova,version=2014.2.1-1.el7.centos,serial=2d406ad2-c45e-4e1b-86f1-1fa56e394d32,uuid=74076b2b-b195-4506-8b89-b86023e390c6 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/instance-00000006.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc,driftfix=slew -no-kvm-pit-reinjection -no-hpet -no-shutdown -boot strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/var/lib/nova/instances/7407 |
This file contains 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
<VirtualHost *:80> | |
ServerAdmin webmaster@localhost | |
DocumentRoot /var/www/html | |
ProxyPassMatch ^/static/(.*)$ http://10.0.3.152/static/$1 | |
ProxyPass / http://10.0.3.152/horizon/ | |
ProxyPassReverse / http://10.0.3.152/horizon/ | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined |
This file contains 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 | |
/* | |
Example usage: <img src="http://owa.yourdomain.com/owa_tracker.php?id=6f2a0582ec2512421a91b2ce26164c3b" alt="owa tracker"> | |
*/ | |
if (isset($_GET['id'])) | |
{ | |
require_once(__DIR__.'owa_php.php'); | |
$owa = new owa_php(); | |
$owa->setSiteId($_GET['id']); |
This file contains 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
#!/bin/sh | |
# Clean file and dirs more than 3 days old in /tmp nightly | |
# http://askubuntu.com/questions/20783/how-is-the-tmp-directory-cleaned-up | |
/usr/bin/find /tmp -type f -atime +2 -mtime +2 |xargs /bin/rm -f && | |
/usr/bin/find /tmp -type d -mtime +2 -exec /bin/rm -rf '{}' \; && | |
/usr/bin/find /tmp -type l -ctime +2 |xargs /bin/rm -f && | |
/usr/bin/find -L /tmp -mtime +2 -print -exec rm -f {} \; |
OlderNewer