Skip to content

Instantly share code, notes, and snippets.

View Sinceretear's full-sized avatar

Hunter Sinceretear

  • San Francisco
View GitHub Profile
client = RedditKit::Client.new 'myredditusername', 'myredditpassword'
client.signed_in?
Error message:
RedditKit::RequestError in PagesController#home
RedditKit::RequestError
Ive also tried.
RedditKit.sign_in 'myredditusername', 'myredditpassword'
@Sinceretear
Sinceretear / gist:6c7efdb72d7e203a896f
Created October 9, 2014 04:08
2 blocks 1 problem
<div id="siteContainer">
<div class="alltheInfo" >
<p>This is the AUDIOMACK NEWS for today</p><br />
<%= @news_links.each do |x| %>
<%= x.text %><a href='<%= x.attr('href') %>'><%= "link" %></a><br />
<% end %>
<div id="container">
<a href='<%= @hnhh.first.href %>'><%= @hnhh[0] %></a>
<br />
<br />
<% @hnhh[41..326].each do |link| %>
<a href='<%= link.href %>'><%= link %></a><br />
<% end %>
@Sinceretear
Sinceretear / gist:9730777
Last active August 29, 2015 13:57
mechanize practice
class MainController < ApplicationController
require 'rubygems'
require 'mechanize'
require 'open-uri'
def home
end
def datapages
@Sinceretear
Sinceretear / gist:9700945
Created March 22, 2014 04:09
some mech code
require 'rubygems'
require 'mechanize'
require 'open-uri'
class Hnhh
url = 'http://www.hotnewhiphop.com/archive/'
agent = Mechanize.new
page = agent.get(url)