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
require 'mechanize' | |
class ChatRoomConnector | |
attr_accessor :generated_password, :username, :email | |
def initialize(username) | |
@username = username | |
@email = "" | |
@generated_password = "" | |
@agent = Mechanize.new |
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
require 'rubygems' | |
require 'nokogiri' | |
require 'open-uri' | |
require 'rss/2.0' | |
class RssParser | |
attr_accessor :url | |
def initialize(url) | |
@url = url |
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
require 'mechanize' | |
agent = Mechanize.new | |
page = agent.get('https://m.facebook.com/') | |
login_form = page.forms.first | |
login_form.email = "user@mail.com" | |
login_form.pass = "password" | |
main_page = agent.submit(login_form, login_form.buttons.first) |
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
de | |
la | |
que | |
el | |
en | |
y | |
a | |
los | |
del | |
se |
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
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com | |
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below) | |
module Player | |
describe MovieList, "with optional description" do | |
it "is pending example, so that you can write ones quickly" | |
it "is already working example that we want to suspend from failing temporarily" do | |
pending("working on another feature that temporarily breaks this one") |
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
git checkout -b feature && git push -u | |
git commit -am "$COMMIT_MESSAGE" | |
git add $FILES_TO_ADD | |
git commit -m "$COMMIT_MESSAGE" | |
git add -p $PATH_TO_FILE | |
git diff master feature |
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
package com.apptegy.arkadelphia.questions; | |
import android.app.ProgressDialog; | |
import android.graphics.Typeface; | |
import android.os.AsyncTask; | |
import android.os.Bundle; | |
import android.util.Log; | |
import android.view.View; | |
import android.widget.ArrayAdapter; | |
import android.widget.Button; |
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
@Override | |
protected JSONObject doInBackground(String... urls) { | |
DefaultHttpClient client = new DefaultHttpClient(); | |
HttpPost post = new HttpPost(urls[0]); | |
JSONObject holder = new JSONObject(); | |
JSONObject userObj = new JSONObject(); | |
String response = null; | |
JSONObject json = new JSONObject(); | |
try { |
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
def authenticate_user | |
@current_user = User.find_by_authentication_token(params[:token]) | |
unless @current_user | |
respond_with({ error: 'Token is invalid.' }) | |
end | |
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
attachments: parent_id, asset_id | |
domain_names: organisation_id | |
event_memberships: user_id, event_id | |
events: editor_id | |
group_actions: user_id, group_id | |
groups: user_id | |
icons: parent_id | |
invitations: sender_id | |
legacy_actions: item_upon_id | |
news_items: author_id |
OlderNewer