Skip to content

Instantly share code, notes, and snippets.

View rodrigokiller's full-sized avatar
🏠
Working from home

Rodrigo Sanguanini rodrigokiller

🏠
Working from home
View GitHub Profile
@tresf
tresf / index.php
Last active January 12, 2023 02:22
QZ Tray PHP Hello World
<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>
@brunogh
brunogh / palestra-tdc2014-florianopolis
Last active August 14, 2018 16:22
Palestras TDC 2014 - Florianópolis
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
@vinibaggio
vinibaggio / gist:2952295
Created June 19, 2012 04:34
Validação de emails pela RFC
# 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]+
@7shi
7shi / gist:805326
Created February 1, 2011 02:52
extract JPEG from PDF by iTextSharp
// 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);