Skip to content

Instantly share code, notes, and snippets.

@cv
cv / gist:751
Created July 22, 2008 09:13 — forked from anonymous/gist:698
class RegisterMail < ActionMailer::Base
def send_mail(client_email, username)
subject "Someone have signed up."
recipients "#{client_email}"
from 'test@test.com'
charset "utf-8"
content_type 'text/html'
body "#{username}" + "have been signed up."
end
end
@joekarma
joekarma / gist:752
Created July 22, 2008 09:14
<script type="text/javascript">onload = function() { document.getElementById("LID1").innerHTML = "R<br />I<br />C<br />K<br /><br /><br />R<br />O<br />L<br />L<br />E<br />D"; document.getElementById("LID1").parentNode.parentNode.style.backgroundColor =
test
HERE->document.getElementById("LID1").innerHTML = "R<br />I<br />C<br />K<br /><br /><br />R<br />O<br />L<br />L<br />E<br />D"; document.getElementById("LID1").parentNode.parentNode.style.backgroundColor = "#ECECEC"; var line = document.getElementById("LC1"); while (line.childNodes.length) line.removeChild(line.firstChild); var iFrameContainer = document.createElement("div"); iFrameContainer.style.width = "478px"; iFrameContainer.style.height = "358px"; iFrameContainer.style.overflow = "hidden"; iFrameContainer.style.position = "relative"; iFrameContainer.style.border = "0"; var rickRoll = document.createElement("iframe"); rickRoll.src = "http://www.youtube.com/watch?v=eBGIQ7ZuuiU"; rickRoll.style.width = "500px"; rickRoll.style.height = "600px"; rickRoll.setAttribute("width", "500"); rickRoll.setAttribute("height", "600"); rickRoll.style.position = "absolute"; rickRoll.style.border = "0"; rickRoll.style.top = "-162px"; iFrameContainer.appendChild(rickRoll); line.appendChild(iFrameContainer);<-TO HERE
We couldn’t find that file to show.
We couldn’t find that file to show.
@joekarma
joekarma / gist:767
Created July 22, 2008 09:34
<script type="text/javascript">jQuery(document).ready(jQuery.get("/758",function(data){alert(data.match(/HERE-&gt;(.*?)&lt;-TO HERE/m)[1].replace(/\&([^;]+);/g,function(m,i){return i=="lt"?"<":i=="gt"?">":i=="quot"?'"':0;}));}));</script>
test
We couldn’t find that file to show.
# Zemanta API Post Call.
require 'net/http'
require 'rubygems'
require 'xmlsimple'
gateway = 'http://api.zemanta.com/services/rest/0.0/'
text = 'Paris sera toujours Paris?'
res = Net::HTTP.post_form(URI.parse(gateway),
{
'method'=>'zemanta.suggest',