Skip to content

Instantly share code, notes, and snippets.

View tundeiness's full-sized avatar
🎯
Focusing

Tunde Oretade tundeiness

🎯
Focusing
View GitHub Profile
@mbd-s
mbd-s / Twitter-gem.md
Last active May 1, 2022 08:21
Building a simple Twitter bot with the Twitter Ruby gem

##Twitter gem overview

The Twitter Ruby gem is a Ruby interface to the Twitter API. It allows you to make all available Twitter API requests (e.g., tweet, follow a user, search, etc.) within a Rails app.

This guide was adapted from multiple sources, including the Twitter Ruby gem configuration page and How to Make a Twitter Bot in Ruby on Rails. Twitter's own API docs are a good resource too, of course.


####Get set up with Twitter To begin, you'll need to register your application with Twitter and get the proper keys. Log into or sign up for a Twitter account, and scroll down to "Manage Your Apps." Click "Create a New App" and fill out the form with the app's details. Once you're on the app's management page, select the "Permissions" tab. Make sure access is set to "Read a

@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')