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
<html><head><meta charset="UTF-8"></head> | |
<body> | |
<!-- USAGE: index.php?var1=some_value_to_print --> | |
<?php | |
if (isset($_GET["var1"])) { | |
echo '<!-- FROM PHP --><script>var var1 = "' . htmlspecialchars($_GET["var1"]) . '";</script>'; | |
} else {?> | |
<form action="index.php" method="get">Some value: <input type="text" name="var1"><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
Palestras TDC 2014 - Florianópolis | |
Watir | |
Lucas Prim | |
http://www.slideshare.net/lucasprim/apresentacao-watir | |
RSpec Best Friends | |
Mauro George | |
http://pt.slideshare.net/maurogeorge/rspec-best-friends-34875731 |
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
# Original: http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html | |
(?:(?:\r\n)?[ \t])*(?:(?:(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t] | |
)+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?: | |
\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:( | |
?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ | |
\t]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\0 | |
31]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\ | |
](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+ |
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
// iTextSharp: http://itextpdf.com/ | |
// reference: http://www.vbforums.com/showthread.php?t=530736 | |
void ExtractJpeg(string file) | |
{ | |
var dir1 = Path.GetDirectoryName(file); | |
var fn = Path.GetFileNameWithoutExtension(file); | |
var dir2 = Path.Combine(dir1, fn); | |
if (!Directory.Exists(dir2)) Directory.CreateDirectory(dir2); |