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
begin | |
#Cause error | |
's' + 99 | |
rescue => e | |
# Do some stuff | |
raise e | |
end |
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
#<Typhoeus::Response:0x007fbe5531e938 @code=200, @curl_return_code=0, @curl_error_message="No error", @status_message=nil, @http_version=nil, @headers="HTTP/1.1 200 OK\r\nDate: Sun, 19 Feb 2012 18:39:12 GMT\r\nServer: Apache\r\nX-Powered-By: PHP/5.3.6\r\nVary: Accept-Encoding,Cookie\r\nCache-Control: max-age=3, must-revalidate\r\nWP-Super-Cache: Served supercache file from PHP\r\nConnection: close\r\nTransfer-Encoding: chunked\r\nContent-Type: text/html; charset=UTF-8\r\n\r\n", @body="<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"><html\nxmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\"><head\nprofile=\"http://gmpg.org/xfn/11\"><link\nrel='stylesheet' href='http://www.hdstreams.info/wp-content/plugins/wp-minify/min/?f=wp-content/themes/ColdBlue/css/reset.css,wp-content/themes/ColdBlue/css/style.css,wp-content/plugins/contact-form-7/styles.css&m=1312812018' type='text/css' media='screen' /> <script type='text/javascript' src |
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
# This works | |
def sieve_upto(top) | |
sieve = [] | |
for i in 2 .. top | |
sieve[i] = i | |
end | |
for i in 2 .. Math.sqrt(top) | |
next unless sieve[i] | |
(i*i).step(top, i) do |j| |
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
# For Theming | |
Forem::ForumsController.layout "forum" | |
Forem::TopicsController.layout "forum" | |
Forem::CategoriesController.layout "forum" | |
Forem::Admin::ForumsController.layout "forum" | |
Forem::Admin::TopicsController.layout "forum" | |
Forem::Admin::CategoriesController.layout "forum" |
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
rake routes | |
blogs GET /blogs(.:format) blogs#index | |
POST /blogs(.:format) blogs#create | |
new_blog GET /blogs/new(.:format) blogs#new | |
edit_blog GET /blogs/:id/edit(.:format) blogs#edit | |
blog GET /blogs/:id(.:format) blogs#show | |
PUT /blogs/:id(.:format) blogs#update | |
DELETE /blogs/:id(.:format) blogs#destroy |
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
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> | |
<% | |
' define found as public (required for findGroup) | |
PUBLIC found, oDomain | |
' set domain ou to search for groups | |
Set oDomain=GetObject("LDAP://ou=Groups,ou=Curriculum,DC=HGS,DC=LOCAL") | |
' set root path for my docs | |
userRootPath = "https://mydocs.heckgrammar.co.uk/MyWork/" | |
' root path for shares |
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
# Individual SQL statement take too long, one insert is by far the fastest | |
connection = ActiveRecord::Base.connection | |
#This is in a looop | |
results.push "(#{resp.response_header.status}, #{url[0]}, #{status_code(resp.response_header.status)}, \"#{resp.response_header}\")" | |
sql = "INSERT INTO reports (`code`, `site_id`, `status`, `headers`) VALUES #{results.join(", ")}" | |
connection.execute sql |
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
Successfully installed em-synchrony-1.0.0 | |
1 gem installed | |
Installing ri documentation for em-synchrony-1.0.0... | |
Installing RDoc documentation for em-synchrony-1.0.0... | |
LoadError: no such file to load -- em-synchrony | |
from /Users/Jake/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require' |
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
I, [2011-12-31T21:46:38.533227 #20270] INFO -- : IronWorker initialized. | |
"#<EventMachine::HttpClient:0x007f8d83a06e10 @conn=#<EventMachine::HttpConnection:0x007f8d83a074a0 @deferred=false, @middleware=[], @connopts=#<HttpConnectionOptions:0x007f8d83a079a0 @connect_timeout=5, @inactivity_timeout=10, @tls={}, @proxy=nil, @host=\"www.google.com\", @port=80>, @uri=\"http://www.google.com\", @clients=[], @pending=[], @p=#<HTTP::Parser:0x007f8d83a06b68>, @conn=#<EventMachine::HttpStubConnection:0x007f8d83a06c58 @signature=2, @parent=#<EventMachine::HttpConnection:0x007f8d83a074a0 ...>, @deferred_status=:succeeded, @callbacks=[], @deferred_timeout=nil, @errbacks=nil, @deferred_args=[]>, @peer=\"\\x10\\x02\\x00P\\xAD\\xC2B\\x93\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\">, @req=#<HttpClientOptions:0x007f8d83a07428 @keepalive=false, @redirects=0, @followed=0, @method=\"GET\", @headers={}, @proxy={}, @query=nil, @path=nil, @file=nil, @body=nil, @pass_cookies=true, @decoding=true, @uri=#<Addressable::URI:0x3fc6c1d0385c U |
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
{"csrf-param"=>"authenticity_token", "csrf-token"=>"x9AmVjIszIelkzftpZCTLefQldZa+wVjpaE43i2yxNs="} | |
"LOLZLSOssoosos oskodkKOKOK" |