The popular open-source contract for web professionals by Stuff & Nonsense
- Originally published: 23rd December 2008
- Revised date: March 15th 2016
- Original post
| require 'rubygems' | |
| require 'nokogiri' | |
| require 'open-uri' | |
| require 'tlsmail' | |
| require 'time' | |
| require 'net/smtp' | |
| def send_email(from, from_alias, to, to_alias, subject, message) | |
| msg = <<END_OF_MESSAGE | |
| From: #{from_alias} <#{from}> |
| function getTitle(html) { | |
| var strHtml = null; | |
| try { | |
| strHtml = html.replace(/<!\[CDATA\[(.+?)\]\]>/g, function (_match, body) { | |
| return body.replace(/&/g, '&') | |
| .replace(/</g, '<') | |
| .replace(/>/g, '>') | |
| }); | |
| strHtml = strHtml.replace(/<!--.+?-->/g, ''); |
| Imports System.Net | |
| Imports System.Web | |
| Imports System.Web.Services | |
| Public Class jSearch | |
| Implements System.Web.IHttpHandler | |
| Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest | |
| Dim byteRequestedHtml() As Byte = Nothing |
| import java.io.BufferedInputStream; | |
| import java.net.URL; | |
| import java.net.URLConnection; | |
| import org.json.JSONArray; | |
| import org.json.JSONObject; | |
| protected void foo () { | |
| // The input stream from the JSON response | |
| BufferedInputStream buffer = null; |
| enscript -1rG --line-numbers -p - --highlight=javascript --color=1 --word-wrap file_name.txt > ~/http://out.ps && open ~/http://out.ps` |
| In the CoffeeScript: | |
| # Row clicking | |
| selected_id = '' | |
| $('#table_name tbody').on "click", "tr", -> | |
| if $(event.target.parentNode).hasClass("info") | |
| $(event.target.parentNode).removeClass "info" | |
| selected_frame_order = '' | |
| else | |
| table_name.$("tr.info").removeClass "info" | |
| $(event.target.parentNode).addClass "info" |
| div { | |
| position: relative; | |
| width: 30vw; | |
| height: 30vw; | |
| line-height: 30vw; | |
| text-align: center; | |
| color: #252B37; | |
| background-color: #151823; | |
| animation: textColor 10s ease infinite; | |
| } |