View generated.html
<a href="/scheduler/show/0000"> | |
<span>NAME</span> | |
</a> | |
<div class="divider"></div> | |
<a class="c-dropdown" href="#" id="dropdown-image"></a> | |
<div class="c-dropdown-menu"> | |
<a class="c-dropdown" href="#" id="dropdown-image"></a> | |
<a href="/user/logout" class="">Logout</a> | |
</div> | |
<span class="hidden" id="current_user">1342020220</span> |
View proxycheck.rb
require 'net/http' | |
my_ip = (require 'open-uri' ; open("http://myip.dk") { |f| /([0-9]{1,3}\.){3}[0-9]{1,3}/.match(f.read)[0] }) | |
puts my_ip | |
counter = 0 | |
proxyFileList = File.new('6_19_2011.txt', 'r') | |
proxyList = [] | |
while (proxy = proxyFileList.gets) |
View nntp.py
from nntplib import NNTP | |
import time | |
def message(subject, group, author, body): | |
header = '' | |
header += "Subject: " + subject | |
header += "\nFrom: " + author | |
header += "\nNewsgroups: " + group | |
t = time.strftime('%d %b %Y %H:%M:%S %Z') | |
header += "\nDate: " + t |
View gist:878154
payload = 'client_id='+client_id + '&client_secret='+ client_secret | |
+ '&code='+ code | |
var options = { | |
host: 'github.com', | |
path: '/login/oauth/access_token', | |
method: 'POST' | |
}; | |
var access_req = https.request(options, function(response){ | |
response.on('error', function(){ |
View heroku errors
2011-01-04T13:30:51-08:00 app[web.1]: /home/slugs/398471_1f1a647_efda-2c46e960-602a-4e6a-8db4-2b3f341534ba/mnt/.bundle/gems/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:304:in `depend_on': No such file to load -- Time (LoadError) | |
2011-01-04T13:30:51-08:00 app[web.1]: from /home/slugs/398471_1f1a647_efda-2c46e960-602a-4e6a-8db4-2b3f341534ba/mnt/.bundle/gems/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:216:in `require_dependency' | |
2011-01-04T13:30:51-08:00 app[web.1]: from /home/slugs/398471_1f1a647_efda-2c46e960-602a-4e6a-8db4-2b3f341534ba/mnt/.bundle/gems/ruby/1.8/gems/railties-3.0.3/lib/rails/engine.rb:138:in `eager_load!' | |
2011-01-04T13:30:51-08:00 app[web.1]: from /home/slugs/398471_1f1a647_efda-2c46e960-602a-4e6a-8db4-2b3f341534ba/mnt/.bundle/gems/ruby/1.8/gems/railties-3.0.3/lib/rails/engine.rb:137:in `each' | |
2011-01-04T13:30:51-08:00 app[web.1]: from /home/slugs/398471_1f1a647_efda-2c46e960-602a-4e6a-8db4-2b3f341534ba/mnt/.bundle/gems/ruby/1.8/gems/railti |
View gist:758086
>> x = [1,2,4,6] | |
=> [1, 2, 4, 6] | |
>> x.is_a | |
NoMethodError: undefined method `is_a' for [1, 2, 4, 6]:Array | |
from (irb):15 | |
>> is_a?(x) | |
TypeError: class or module required | |
from (irb):16:in `is_a?' | |
from (irb):16 |
View gist:756370
# app/mailers/user_mailer.rb | |
class UserMailer < ActionMailer::Base | |
default :from => "noreply@coursesillinois.com" | |
def welcome_email(user) | |
@user = user | |
@url = "http://coursesillinois.com/login" | |
mail(:to => "myemail@gmail.com", :subject => "Welcome to My Awesome Site") | |
end | |
end |
View gist:755711
(05:03:15 PM) Adam Cu: You will need to add /home/kryali/ruby/gems to the include path. | |
You can do this by adding the following code to your script: $:.push("/home/kryali/ruby/gems") | |
(05:03:47 PM) Kiran: where do I do this? | |
(05:04:09 PM) Adam Cu: Add the code to your script. | |
(05:04:15 PM) Kiran: which file? | |
(05:05:02 PM) Adam Cu: Is there more than one script file for Rake Server? | |
(05:05:50 PM) Adam Cu: I am not 100% certain. I am not able to see everything as you see it. But based on what I have seen, You will need to add /home/kryali/ruby/gems to the include path. | |
(05:06:03 PM) Adam Cu: You can do this by adding the following code to your script: $:.push("/home/kryali/ruby/gems") |