This file contains hidden or 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
$('form.simple_form').submit(function(e){ | |
var textarea = $('textarea.text_required').val(); | |
if (textarea == '') | |
{ | |
e.preventDefault(); | |
var msg = 'The comment field is a required field'; | |
$('div.scroll > p').append(msg); | |
} | |
}); |
This file contains hidden or 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 | |
require_once('./class/lib/PHPMailer_Class.php'); | |
require_once('./class/Marketing_Class.php'); | |
if($_SERVER['REQUEST_METHOD'] == 'POST') | |
{ | |
$marketing = new Marketing; | |
$marketing->destination = dirname(__FILE__) . '/files/'; | |
$marketing->type = 'html'; | |
$marketing->file = $_FILES; |
This file contains hidden or 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 | |
/** | |
* @author Luiz Fonseca | |
* Sample Class | |
* | |
*/ | |
class Marketing { | |
public $destination = null; |
This file contains hidden or 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
Started POST "/noticias" for 200.163.80.113 at Mon Feb 21 22:03:21 -0300 2011 | |
Processing by NoticiasController#create as HTML | |
Parameters: {"commit"=>"Create Noticia", "authenticity_token"=>"VpFKkGEMG6B4wphkvUVHhLuiLtO36EX/Bj6D9PJuKcU=", "utf8"=>"✓", "noticia"=>{"date(1i)"=>"2011", "author"=>"noticia[author]", "date(2i)"=>"2", "date(3i)"=>"22", "titulo"=>"noticia[titulo]", "text"=>"<p>asdasd</p>", "credits"=>"noticia[credits]", "link"=>"noticia[link]", "call"=>"noticia[call]", "image"=>#<ActionDispatch::Http::UploadedFile:0xa99456c @tempfile=#<File:/tmp/RackMultipart20110221-21964-14qe040-0>, @original_filename="xHCiT.jpg", @headers="Content-Disposition: form-data; name=\"noticia[image]\"; filename=\"xHCiT.jpg\"\r\nContent-Type: image/jpeg\r\n", @content_type="image/jpeg">}} | |
[paperclip] /usr/local/bin/identify -format %wx%h '/tmp/stream20110221-21964-lklkmy-0.jpg[0]' 2>/dev/null | |
[paperclip] An error was received while processing: #<Paperclip::CommandNotFoundError: Paperclip::CommandNotFoundError> | |
[papercli |
This file contains hidden or 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
~ luiz$ python -c "print(12345**54321)" > /dev/null | |
real 0m23.445s | |
user 0m22.524s | |
sys 0m0.152s | |
~ luiz$ time ruby -e "puts 12345**54321" > /dev/null | |
real 0m10.127s | |
user 0m9.932s |
This file contains hidden or 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
(?:http://(?:(?:(?:(?:(?:[a-zA-Z\d](?:(?:[a-zA-Z\d]|-)*[a-zA-Z\d])?)\. | |
)*(?:[a-zA-Z](?:(?:[a-zA-Z\d]|-)*[a-zA-Z\d])?))|(?:(?:\d+)(?:\.(?:\d+) | |
){3}))(?::(?:\d+))?)(?:/(?:(?:(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?:%[a-fA-F | |
\d]{2}))|[;:@&=])*)(?:/(?:(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?:%[a-fA-F\d]{ | |
2}))|[;:@&=])*))*)(?:\?(?:(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?:%[a-fA-F\d]{ | |
2}))|[;:@&=])*))?)?)|(?:ftp://(?:(?:(?:(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(? | |
:%[a-fA-F\d]{2}))|[;?&=])*)(?::(?:(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?:%[a- | |
fA-F\d]{2}))|[;?&=])*))?@)?(?:(?:(?:(?:(?:[a-zA-Z\d](?:(?:[a-zA-Z\d]|- | |
)*[a-zA-Z\d])?)\.)*(?:[a-zA-Z](?:(?:[a-zA-Z\d]|-)*[a-zA-Z\d])?))|(?:(? | |
:\d+)(?:\.(?:\d+)){3}))(?::(?:\d+))?))(?:/(?:(?:(?:(?:[a-zA-Z\d$\-_.+! |
This file contains hidden or 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 | |
if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start(); | |
?> |
This file contains hidden or 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
sudo env ARCHFLAGS="-arch i386" gem install mysql -- \ | |
--with-mysql-dir=/usr/local/mysql --with-mysql-lib=/usr/local/mysql/lib \ | |
--with-mysql-include=/usr/local/mysql/include |
NewerOlder