Refactor
:my
=>
'code'
Codes
Refactorings
Popular
Best
Submit
Spam
Account
Logout
Login
JavaScript doesn't seem to be activated, expect things to be ugly and sloppy!
Learn How to Create Your Own Programming Language
createyourproglang.com
Recent
How to get accepted in Fileice (200% Working) 22/2012
Premium Account
FILE HOSTS PREMIUM ACCOUNT
ALL FILE HOST PREMIUM ACCOUNTS
Zynga Slingo Trainer v5.12
iTunes Gift Card Generator V3.1 2012
Diablo 3 GOLD Coins FREE
Working PS3 Jailbreak 3.65 And 3.66
ExtaBit Premium Accounts and Cookies
Steam Wallet Hack - Money Adder & Hack v3
Popular
XBOX POINTS GENERATOR - MICROSOFT POINTS GENERATOR v1.2012
11 may 2012 premium uploading accounts 100% working
Free Microsoft Points
Free Microsoft Points - Microsoft Points Generator - Xbox Live Codes 2012
Car Town Free Blue Points Hack
Free CarTown Blue Points Generator and CarTown Templates
Better way to get content via jQuery $.get()
Free Microsoft Points
Simple Days Purger
Sharecash Downloader Bypass Surveys New 05/2012
Pastable version of
Working ruby code, but messy ....
<pre class='prettyprint' language='ruby'>#!/usr/bin/ruby puts "Content-Type: text/html\n\n" require 'net/http' require 'uri' require 'open-uri' require 'date' @@begin_time = Time.now def check_urls(url, iterate) puts "<h3>Checking URLS</h3>" puts "<ul>" iterate.times do |i| uri_output = Net::HTTP.get(URI.parse(url[i])).scan(/\d{2}\.\d{2}\.\d{4}/)[0] site_kind = Net::HTTP.get(URI.parse(url[i])).include? "SPECIAL" if uri_output == nil puts "<li>[NOTHING FOUND] <a href='" + url[i] + "' target='_blank'>" + url[i] + "</a></li>" else site_date = Date.strptime(uri_output, "%d.%m.%Y") current_date = Date.today difference = current_date - chart_date if site_kind == true && difference > 7 puts "<li>[NOT UPDATED] #{site_date} <a href='" + url[i] + "' target='_blank'>" + url[i] + "</a></li>" else if site_kind == false && difference > 1 puts "<li>[NOT UPDATED] #{site_date} <a href='" + url[i] + "' target='_blank'>" + url[i] + "</a></li>" else puts "<li>[OK] #{site_date} <a href='" + url[i] + "' target='_blank'>" + url[i] + "</a></li>" end end end end puts "</ul>" puts "</ul> <strong>ALL DONE</strong>" executed_time = Time.now - @@begin_time to_minutes(executed_time) end def to_minutes(seconds) min = (seconds/60).floor sec = (seconds - (min * 60)).round if min < 10 min = "0#{min}" end if sec < 10 sec = "0#{sec}" end puts "in <strong>#{min}:#{sec}</strong>" end websites = IO.read('websites.txt').split number_of_lines = websites.length check_urls(websites, number_of_lines)</pre> <a href="http://www.refactormycode.com/codes/776-working-ruby-code-but-messy" style="color:#fff" title="As seen on RefactorMyCode.com"><img alt="Small_logo" src="http://www.refactormycode.com/images/small_logo.gif" style="border:0" /></a>