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 | |
//core.php | |
Configure::write('Acl.classname', 'PhpAcl'); | |
// acl.php | |
$config['map'] = array( |
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 | |
/* Memcached nativo */ | |
$m = new Memcached(); | |
$m->addServer('localhost', 11211); | |
$m->set('itens', $itens, 60); | |
/* Memcached Cake */ |
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
<!-- Google Analytics: change UA-XXXXX-X to be your site's ID. --> | |
<script> | |
(function(b, o, i, l, e, r) { | |
b.GoogleAnalyticsObject = l; | |
b[l] || (b[l] = | |
function() { | |
(b[l].q = b[l].q || []).push(arguments) | |
}); | |
b[l].l = +new Date; | |
e = o.createElement(i); |
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
<!-- View --> | |
<script> | |
$.ajax({ | |
type: 'post', | |
url: '<?php echo Router::url(array('controller' => 'x', 'action' => 'y')); ?>', | |
data: 'chave=valor&chave2=valor2', | |
success: function(data){ | |
alert(data); | |
}, |
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 | |
echo 'Teste pela extensão gistnote do Gnome Shell'; |
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
# Ativando compactação | |
<FilesMatch ".(js|css|html|htm|php|xml)$"> | |
SetOutputFilter DEFLATE | |
</FilesMatch> | |
# Ativando cache no browser | |
<IfModule mod_expires.c> | |
ExpiresActive on |
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
import UIKit | |
import MobileCoreServices | |
class ViewController: UIViewController, UINavigationControllerDelegate, UIImagePickerControllerDelegate { | |
@IBOutlet weak var imgView: UIImageView! | |
var newMedia: Bool? | |
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
// | |
// ViewController.swift | |
// apirequest | |
// | |
// Created by Andre Cardoso on 9/24/15. | |
// | |
import UIKit | |
import Foundation |
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
class RequestPost { | |
public Boolean isJson(String str) { | |
try { | |
new JSONObject(str); | |
} catch (JSONException ex) { |
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 | |
// app/Config/database.php | |
public $wordpress = array( | |
'datasource' => 'Database/Mysql', | |
'persistent' => false, | |
'host' => 'localhost', | |
'login' => 'root', | |
'password' => 'root', |