Skip to content

Instantly share code, notes, and snippets.

View abacha's full-sized avatar

Adriano Bacha abacha

  • São Paulo, SP
  • 13:58 (UTC -03:00)
View GitHub Profile
~/projects/graphite-web/examples (master ✔‹ruby-2.0.0›) curl -H 'Accept-Content: application/json' http://localhost/graphite/render\?target\=system.loadavg_1min\&format\=json
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<!-- Copyright 2008 Orbitz WorldWide
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
on ^*:hotlink:*//*.*:*:{ }
on *:hotlink:*//*.*:*: http $1
on ^*:hotlink:*www.*:*:{ }
on *:hotlink:*www.*:*: http $1
alias http {
on ^*:hotlink:*//*.*:*:{ }
on *:hotlink:*//*.*:*: http $1
on ^*:hotlink:*www.*:*:{ }
on *:hotlink:*www.*:*: http $1
alias http {
<?
if (!empty($_FILES)) {
$tempFile = $_FILES['Filedata']['tmp_name'];
$targetPath = $_SERVER['DOCUMENT_ROOT'] . $_REQUEST['folder'] . '/';
$targetFile = str_replace('//','/',$targetPath) . $_FILES['Filedata']['name'];
$fileTypes = str_replace('*.','',$_REQUEST['fileext']);
$fileTypes = str_replace(';','|',$fileTypes);
$typesArray = split('\|',$fileTypes);
$fileParts = pathinfo($_FILES['Filedata']['name']);
<?= $form->file("upload") ?>
<a href="javascript:jQuery('#BookUpload').uploadifyUpload();">Upload</a>
<a href="javascript:jQuery('#BookUpload').uploadifyClearQueue();">Clear</a>
<script type="text/javascript">
jQuery.noConflict();
jQuery(document).ready(function() {
jQuery('#BookUpload').uploadify({
'uploader':'/uploadify/uploadify.swf',
'script':'/uploadify/uploadify.php',
'cancelImg':'/uploadify/cancel.png',
'folder':'/uploadify/files/<?=$_SESSION["Config"]["userAgent"]?>',
'fileExt':'*.zip;*.pdf;*.rar;*.txt;*.doc;*.xls;*.docx;*.xlsx;*.chm;*.tar;*.tar.gz;*.tgz;*.tar.bz;*.tar.bz2',
'fileDesc':'*.zip;*.pdf;*.rar;*.txt;*.doc;*.xls;*.docx;*.xlsx;*.chm;*.tar;*.tar.gz;*.tgz;*.tar.bz;*.tar.bz2',
<?
function testAttributes() {
$this->assertFalse($this->Usuario->validates(), 'should be invalid');
$this->Usuario->set("nome", "adriano");
$this->assertTrue($this->Usuario->save(), 'should be valid');
}
?>
We couldn’t find that file to show.
var $validate = array(
'rule' => array('custom', '/^[\x20-\x7E]+$/i'),
'required' => true
);
We couldn’t find that file to show.